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.
In reply to Re^2: Mysteries of unpack("a", ...)
by BrowserUk
in thread Mysteries of unpack("a", ...)
by pspinler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |