Adding to RichardK above: the byteorder string is not an integer value (hex or otherwise), it just gives the memory layout.
Interesting that human thinking seems to be inherently little-endian itself — the "1" for "first" corresponds with the least significant byte. Or more likely, it acknowledges the ranking or integer types: small values are a subset of bigger integers' values, so each larger type extends the range. In this sense, the extra bytes are additional hence enumerated in that order. But enough with Semiotics.
Glibc headers for example come with the following definitions in /usr/include/endian.h:
... which allows for convenient testing a la #if __BYTE_ORDER == __LITTLE_ENDIAN; clearly this convention is not a perl quirk.#define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412
In reply to Re: Is the documentation ... correct (the name of the rose)
by Anonymous Monk
in thread Is the documentation for Perl 5.20 'pack' correct?
by flexvault
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |