In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/e1f120a9bcedababe219d448b4b0cb0b1153e992?hp=388a738468888624b9ee18ce319fa7082b2df529>

- Log -----------------------------------------------------------------
commit e1f120a9bcedababe219d448b4b0cb0b1153e992
Author: Karl Williamson <k...@khw-desktop.(none)>
Date:   Sun Jul 18 13:12:39 2010 -0600

    pods: mention \o{}, 3 octal digits
    
    This patch adds a mention of \o{} to perlre to avoid the backreference
    ambiguities, and uses 3 octal digits in an example, and suggests using 3
    digits where 2 were suggested before.
    
    Signed-off-by: David Golden <[email protected]>
-----------------------------------------------------------------------

Summary of changes:
 pod/perldiag.pod |    4 ++--
 pod/perlfunc.pod |    2 +-
 pod/perlre.pod   |   11 ++++++-----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 9f9fe4b..9166457 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -3799,8 +3799,8 @@ backreferences), but using 0 does not make sense.
 
 (F) You used something like C<\7> in your regular expression, but there are
 not at least seven sets of capturing parentheses in the expression. If you
-wanted to have the character with value 7 inserted into the regular expression,
-prepend a zero to make the number at least two digits: C<\07>
+wanted to have the character with ordinal 7 inserted into the regular 
expression,
+prepend zeroes to make it three digits long: C<\007>
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index b6ded9b..42095a0 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3943,7 +3943,7 @@ the I<length-item> is the string length, not the number 
of strings.  With
 an explicit repeat count for pack, the packed string is adjusted to that
 length.  For example:
 
-    unpack("W/a", "\04Gurusamy")            gives ("Guru")
+    unpack("W/a", "\004Gurusamy")           gives ("Guru")
     unpack("a3/A A*", "007 Bond  J ")       gives (" Bond", "J")
     unpack("a3 x2 /A A*", "007: Bond, J.")  gives ("Bond, J", ".")
 
diff --git a/pod/perlre.pod b/pod/perlre.pod
index 2e00f0b..98aafdd 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -450,11 +450,12 @@ capture group, or the character whose ordinal in octal is 
010 (a backspace in
 ASCII).  Perl resolves this ambiguity by interpreting C<\10> as a backreference
 only if at least 10 left parentheses have opened before it.  Likewise C<\11> is
 a backreference only if at least 11 left parentheses have opened before it.
-And so on.  C<\1> through C<\9> are always interpreted as backreferences.  You
-can minimize the ambiguity by always using C<\g> if you mean capturing groups;
-and always using 3 digits for octal constants, with the first always "0" (which
-works if there are 63 (= \077) or fewer capture groups).  There are several
-examples below that illustrate these perils.
+And so on.  C<\1> through C<\9> are always interpreted as backreferences.
+There are several examples below that illustrate these perils.  You can avoid
+the ambiguity by always using C<\g{}> or C<\g> if you mean capturing groups;
+and for octal constants always using C<\o{}>, or for C<\077> and below, using 3
+digits padded with leading zeros, since a leading zero implies an octal
+constant.
 
 The C<\I<digit>> notation also works in certain circumstances outside
 the pattern.  See L</Warning on \1 Instead of $1> below for details.)

--
Perl5 Master Repository

Reply via email to