This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RT #77150: perlre documentation issue and possible fix
authorChas. Owens <chas.owens@gmail.com>
Sat, 14 Aug 2010 18:05:18 +0000 (13:05 -0500)
committerSteve Peters <steve@fisharerojo.org>
Sat, 14 Aug 2010 18:05:18 +0000 (13:05 -0500)
pod/perl5134delta.pod
pod/perlre.pod

index 418ac88..045b347 100644 (file)
@@ -190,9 +190,21 @@ XXX
 
 =head1 Documentation
 
+=head2 Modifications
+
 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
 
+=head3 perlre
+
+=over 4
+
+=item *
+
+Minor fix to a multiple scalar match example.
+
+=back
+
 =head2 New Documentation
 
 XXX Changes which create B<new> files in F<pod/> go here.
index 98aafdd..de5b719 100644 (file)
@@ -363,11 +363,11 @@ not counted when determining the length of the match. Thus the following
 will not match forever:
 X<\G>
 
-    $str = 'ABC';
-    pos($str) = 1;
-    while (/.\G/g) {
-        print $&;
-    }
+     my $string = 'ABC';
+     pos($string) = 1;
+     while ($string =~ /(.\G)/g) {
+         print $1;
+     }
 
 It will print 'A' and then terminate, as it considers the match to
 be zero-width, and thus will not match at the same position twice in a