diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2002-02-21 01:06:14 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-21 17:28:23 +0000 |
commit | 18529408d66077360bcde31227a7fb97dfc49222 (patch) | |
tree | 940b010257b7ddcef7fc18baec0bc75724bc3640 /pod/perlfunc.pod | |
parent | 7a2cf369e16a2ef8ad45d686139073724ed14fe2 (diff) | |
download | perl-18529408d66077360bcde31227a7fb97dfc49222.tar.gz |
grouping in pack/unpack
Message-ID: <20020221060614.A29836@math.ohio-state.edu>
p4raw-id: //depot/perl@14815
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r-- | pod/perlfunc.pod | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index ea196c27c0..56ad58f474 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3104,9 +3104,8 @@ the converted values. Typically, each converted value looks like its machine-level representation. For example, on 32-bit machines a converted integer may be represented by a sequence of 4 bytes. -The TEMPLATE is a -sequence of characters that give the order and type of values, as -follows: +The TEMPLATE is a sequence of characters that give the order and type +of values, as follows: a A string with arbitrary binary data, will be null padded. A A text (ASCII) string, will be space padded. @@ -3170,6 +3169,7 @@ follows: x A null byte. X Back up a byte. @ Null fill to absolute position. + ( Beginning of a ()-group. The following rules apply: @@ -3183,7 +3183,8 @@ C<H>, and C<P> the pack function will gobble up that many values from the LIST. A C<*> for the repeat count means to use however many items are left, except for C<@>, C<x>, C<X>, where it is equivalent to C<0>, and C<u>, where it is equivalent to 1 (or 45, what is the -same). +same). A numeric repeat count may optionally be enclosed in brackets, as in +C<pack 'C[80]', @arr>. When used with C<Z>, C<*> results in the addition of a trailing null byte (so the packed result will be one longer than the byte C<length> @@ -3400,6 +3401,12 @@ sequences of bytes. =item * +A ()-group is a sub-TEMPLATE enclosed in parentheses. A group may +take a repeat count, both as postfix, and via the C</> template +character. + +=item * + A comment in a TEMPLATE starts with C<#> and goes to the end of line. =item * |