If you need to distinguish between endian architectures you could use either of the variables set like so:$is_big_endian = unpack("h*", pack("s", 1)) =~ /01/; $is_little_endian = unpack("h*", pack("s", 1)) =~ /^1/;
In reply to Re: How can I programatically determine the Endian-ness of the CPU?
by wog
in thread How can I programatically determine the Endian-ness of the CPU?
by ton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |