Maybe unpack can't but pack can :)
try:
return unpack '(Q<)*', pack '(a8)*', unpack "(a$length)*", $stream;
And you no longer need $pad or the map.
semi-tested :)
In reply to Re^2: Can unpack add zero bytes before converting?
by tybalt89
in thread Can unpack add zero bytes before converting?
by mossi2000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |