in reply to Re: Mysteries of unpack("a", ...)
in thread Mysteries of unpack("a", ...)
Or rather
substr substr(do { _utf8_off(my $internal = $_); $internal }, 0, 4) . chr(0) x 4, 0, 4;
How's that! (for out-pedanting the pedant! (Always assuming I got it right :)
From perlfunc:pack (I'm too tired to fix up the link):
a A string with arbitrary binary data, will be null padded.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Mysteries of unpack("a", ...)
by ikegami (Patriarch) on Jan 03, 2009 at 06:58 UTC |