unpack and trailing whitespace in strings

Rafael Garcia-Suarez rgarciasuarez at gmail.com
Fri May 26 09:05:07 BST 2006

On 25/05/06, Jonathan McKeown <jonathan at hst.org.za> wrote:
> perlfunc says unpack 'A*' strips trailing spaces and nulls.
> It appears (in 5.8.6 and 5.8.7 at least) to strip all trailing whitespace:

The latest incarnation of perlfunc (in bleadperl) appears to document
that point :

The C<a>, C<A>, and C<Z> types gobble just one value, but pack it as a
string of length count, padding with nulls or spaces as necessary.  When
unpacking, C<A> strips trailing whitespace and nulls, C<Z> strips everything
after the first null, and C<a> returns data verbatim.

(5.8.8's perlfunc has "trailling spaces and nulls" instead)

More information about the london.pm mailing list