in reply to Re: pack, unpack and internal represenation of numbers
in thread pack, unpack and internal represenation of numbers

Ok, but shouldn't a number, at run time, "obey the native byte order and endianness" as well?

If this integer were stored in integer form internally, and I unpack that into short ints, I should get some pattern of 0x01, 0x02, 0x03, and 0x04 depending on the endianness.

Perl's internal representation is not integer, but it is also not "double float"; at least not as defined by pack/unpack.

I think maybe what I'm really asking is: "How do I go about packing 0x01020304 such that I get "49545748" as my answer?" Realizing of course, this answer is valid only on similar architecture machines...

  • Comment on Re^2: pack, unpack and internal represenation of numbers