The documentation for pack() goes into this is some detail. You should read
perldoc -f pack. For example, it says:
The integer formats `s', `S', `i', `I',
`l', and `L' are inherently non-portable
between processors and operating systems
because they obey the native byteorder and
endianness. For example a 4-byte integer
0x12345678 (305419896 decimal) be ordered
natively (arranged in and handled by the
CPU registers) into bytes as
0x12 0x34 0x56 0x78 # little-endian
0x78 0x56 0x34 0x12 # big-endian
Basically, the Intel, Alpha, and VAX CPUs
are little-endian, while everybody else,
for example Motorola m68k/88k, PPC, Sparc,
HP PA, Power, and Cray are big-endian.
MIPS can be either: Digital used it in
little-endian mode; SGI uses it in big-
endian mode.
And it runs onward, into the sunset...
Paris Sinclair | 4a75737420416e6f74686572
pariss@efn.org | 205065726c204861636b6572
I wear my Geek Code on my finger.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.