Is there an option to find if my system is little endian byte order or big endian byte order using Perl?
I guess you could do:
$big_endian = pack("L", 1) eq pack("N", 1);
This might fail if your system has a nonstandard (neither big-endian nor little-endian) byte ordering (eg PDP-11).