Well footnote 7 does say:
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, in a regular expression it may be confused with a
backreference; see "Octal escapes" in perlrebackslash.)
So it would be much more clear with the 3 digit representation. But in this particular context, it works out:
use feature 'say';
use Data::Dump qw(dump);
say dump( pack("c*", 10, 3, 30, 21 ) ); # outputs "\n\3\36\25"
say dump( unpack("c*", "\n\3\36\25") ); # outputs (10, 3, 30, 21)
say dump( unpack("c*", "\n\003\036\025") ); # outputs (10, 3, 30, 21)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.