diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2010-06-22 14:29:10 -0600 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2010-06-28 22:30:04 -0400 |
commit | d8b950dcbc51bd501c5dc196cc12d87eaf47b60c (patch) | |
tree | fd00ef847f27621f035f8c4fd827df582fa1433d /pod/perlfaq6.pod | |
parent | c27a5cfe2661343fcb3b4f58478604d8b59b20de (diff) | |
download | perl-d8b950dcbc51bd501c5dc196cc12d87eaf47b60c.tar.gz |
Prefer \g1 over \1 in pods
\g was added to avoid ambiguities that \digit causes. This updates the
pod documentation to use \g in examples, and to prefer it when
explaining the concepts. Some non-symmetrical outlined text dealing
with it was also cleaned up.
Diffstat (limited to 'pod/perlfaq6.pod')
-rw-r--r-- | pod/perlfaq6.pod | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlfaq6.pod b/pod/perlfaq6.pod index b51884d063..fe91933bba 100644 --- a/pod/perlfaq6.pod +++ b/pod/perlfaq6.pod @@ -99,7 +99,7 @@ record read in. $/ = ''; # read in whole paragraph, not just one line while ( <> ) { - while ( /\b([\w'-]+)(\s+\1)+\b/gi ) { # word starts alpha + while ( /\b([\w'-]+)(\s+\g1)+\b/gi ) { # word starts alpha print "Duplicate $1 at paragraph $.\n"; } } |