summaryrefslogtreecommitdiff
path: root/pod/perlfaq6.pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-06-22 14:29:10 -0600
committerJesse Vincent <jesse@bestpractical.com>2010-06-28 22:30:04 -0400
commitd8b950dcbc51bd501c5dc196cc12d87eaf47b60c (patch)
treefd00ef847f27621f035f8c4fd827df582fa1433d /pod/perlfaq6.pod
parentc27a5cfe2661343fcb3b4f58478604d8b59b20de (diff)
downloadperl-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.pod2
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";
}
}