in reply to How to easily convert the pack function from little endian to big endian
If you control both ends, either use the alread mentioned "S>" or "S<" or the network versions "n" and "v" (see perldoc -f pack).
s A signed short (16-bit) value. S An unsigned short value. n An unsigned short (16-bit) in "network" (big-endian) order. v An unsigned short (16-bit) in "VAX" (little-endian) order.
I made an overview of those pack results here for one of my talks.
Enjoy, Have FUN! H.Merijn
|
---|
In Section
Seekers of Perl Wisdom