Howdy,
Let me first issue the caveat that I have very little experience with bit
manipulation, so this may be a dumb question.
Consider the following one-liners:
% perl -MConfig -le 'print $Config{byteorder}'
4321
% perl -le 'print join(" ", map { sprintf "%#02x", $_ } \
-> unpack("C*",pack("L",0x12345678)))'
0x12 0x34 0x56 0x78
Those are the two methods `perldoc -f pack` suggests for finding out
whether a machine is big-endian or little-endian. However, according to
that page, the first output indicates big-endian, but the second output
indicates little-endian.
Anyone know why this is happening, and what the real answer is?
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum