Skip to content

Commit 5a0c7e9

Browse files
pjcjrjbs
authored andcommitted
Correct variable name in example.
As noticed by Lawrence Statton <[email protected]>
1 parent 68cd360 commit 5a0c7e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pod/perlretut.pod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,9 +1583,9 @@ there are no groupings, a list of matches to the whole regexp. So if
15831583
we wanted just the words, we could use
15841584

15851585
@words = ($x =~ /(\w+)/g); # matches,
1586-
# $word[0] = 'cat'
1587-
# $word[1] = 'dog'
1588-
# $word[2] = 'house'
1586+
# $words[0] = 'cat'
1587+
# $words[1] = 'dog'
1588+
# $words[2] = 'house'
15891589

15901590
Closely associated with the C<//g> modifier is the C<\G> anchor. The
15911591
C<\G> anchor matches at the point where the previous C<//g> match left

0 commit comments

Comments
 (0)