diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2010-06-22 15:01:01 -0600 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2010-06-28 22:30:05 -0400 |
commit | ce7b6f06f41c076280ab53e616c11c68b71e5ef7 (patch) | |
tree | 992f1bbdfd40e0fae030828f52c745968561b426 /pod/perlfunc.pod | |
parent | 301ba1afeb2ee79c2a7681e2b9dcb8f9231673f7 (diff) | |
download | perl-ce7b6f06f41c076280ab53e616c11c68b71e5ef7.tar.gz |
Prefer 3 digit octal character constants
By example and a few wording changes, show that 3 digit octal character
constants have less ambiguity.
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index d528e2f176..43a334de3f 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3880,7 +3880,7 @@ For each such format, pack() generates 4 bits of the result. With non-alphabetical characters, the result is based on the 4 least-significant bits of the input character, i.e., on C<ord($char)%16>. In particular, characters C<"0"> and C<"1"> generate nybbles 0 and 1, as do bytes -C<"\0"> and C<"\1">. For characters C<"a".."f"> and C<"A".."F">, the result +C<"\000"> and C<"\001">. For characters C<"a".."f"> and C<"A".."F">, the result is compatible with the usual hexadecimal digits, so that C<"a"> and C<"A"> both generate the nybble C<0xa==10>. Do not use any characters but these with this format. @@ -4204,8 +4204,8 @@ Examples: # $foo = pack("WWWW",193,194,195,196); $foo = pack("s2",1,2); - # "\1\0\2\0" on little-endian - # "\0\1\0\2" on big-endian + # "\001\000\002\000" on little-endian + # "\000\001\000\002" on big-endian $foo = pack("a4","abcd","x","y","z"); # "abcd" |