in reply to pack() v unpack() padding: bug or ???
This pack thing is just a pain. unpack is not the exact opposite, no.
The "a", "A", and "Z" types gobble just one value, but pack it as a string of length count, padding with nulls or spaces as needed. When unpacking, "A" strips trailing whitespace and nulls, "Z" strips everything after the first null, and "a" returns data with no stripping at all.pack
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: pack() v unpack() padding: bug or ??? (strip)
by tye (Sage) on Feb 16, 2015 at 19:23 UTC |
In Section
Seekers of Perl Wisdom