doc tweak suggested by M.J.T. Guy <mjtg@cus.cam.ac.uk>
authorGurusamy Sarathy <gsar@cpan.org>
Wed, 24 Mar 1999 10:15:00 +0000 (10:15 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 24 Mar 1999 10:15:00 +0000 (10:15 +0000)
p4raw-id: //depot/perl@3151

pod/perlop.pod

index 313ed58..f70311b 100644 (file)
@@ -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";