in reply to unpack - array takes too many bytes

BrowserUK's suggested use of constant works really nicely!

You (and I!) should also look at the enum pragma to simplify declaring such incremental constants:

use enum qw[ NAME ONEBYTE TWOBYTE FOURBYTE TWOBYTE2 TRAILING ];

Makes such things much cleaner.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.