summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-03-24 10:15:00 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-03-24 10:15:00 +0000
commitfa08c05b640ede69b33d2ae5b23634d6e5b0865c (patch)
treee4917a4652007919bf170ea67d0d42d77e17079a /pod/perlop.pod
parent0650ba1c71b86de5b30e0e7971fefc789a9bfbfc (diff)
downloadperl-fa08c05b640ede69b33d2ae5b23634d6e5b0865c.tar.gz
doc tweak suggested by M.J.T. Guy <mjtg@cus.cam.ac.uk>
p4raw-id: //depot/perl@3151
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod10
1 files changed, 6 insertions, 4 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 313ed583a5..f70311b8e1 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -830,10 +830,12 @@ Examples:
($one,$five,$fifteen) = (`uptime` =~ /(\d+\.\d+)/g);
# scalar context
- $/ = ""; $* = 1; # $* deprecated in modern perls
- while (defined($paragraph = <>)) {
- while ($paragraph =~ /[a-z]['")]*[.!?]+['")]*\s/g) {
- $sentences++;
+ {
+ local $/ = "";
+ while (defined($paragraph = <>)) {
+ while ($paragraph =~ /[a-z]['")]*[.!?]+['")]*\s/g) {
+ $sentences++;
+ }
}
}
print "$sentences\n";