summaryrefslogtreecommitdiff
path: root/pod/perlop.pod
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-09-17 12:46:20 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-09-17 12:46:55 -0700
commit5db3e519a7d788a64d2a04b7951535d385d0b9cf (patch)
tree69b5598a625052d2509c7ab7f50f67487b6ee5b6 /pod/perlop.pod
parent986a805c4b258067b82c4f1254518e53cdb1acdf (diff)
downloadperl-5db3e519a7d788a64d2a04b7951535d385d0b9cf.tar.gz
perlop: Clarify \octal slightly
This is to address ticket #94252.
Diffstat (limited to 'pod/perlop.pod')
-rw-r--r--pod/perlop.pod7
1 files changed, 4 insertions, 3 deletions
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 695ec3db39..169c5f1400 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -1173,7 +1173,8 @@ L</[8]> below for details on which character.
Some contexts allow 2 or even 1 digit, but any usage without exactly
three digits, the first being a zero, may give unintended results. (For
-example, see L<perlrebackslash/Octal escapes>.) Starting in Perl 5.14, you may
+example, in a regular expression it may be confused with a backreference;
+see L<perlrebackslash/Octal escapes>.) Starting in Perl 5.14, you may
use C<\o{}> instead, which avoids all these problems. Otherwise, it is best to
use this construct only for ordinals C<\077> and below, remembering to pad to
the left with zeros to make three digits. For larger ordinals, either use
@@ -1183,8 +1184,8 @@ instead.
Having fewer than 3 digits may lead to a misleading warning message that says
that what follows is ignored. For example, C<"\128"> in the ASCII character set
is equivalent to the two characters C<"\n8">, but the warning C<Illegal octal
-digit '8' ignored> will be thrown. To avoid this warning, make sure to pad
-your octal number with C<0>'s: C<"\0128">.
+digit '8' ignored> will be thrown. If C<"\n8"> is what you want, you can
+avoid this warning by padding your octal number with C<0>'s: C<"\0128">.
=item [8]