in reply to Re: Implementing a signed/sign-propagating right bitwise shift
in thread Implementing a signed/sign-propagating right bitwise shift
endianness may become important if you store numbers as binary data in a string (with the pack function) or on disk. It is important in languages like C that allow you to use the memory cells your integers are stored in as any other data type.
Perl (and many other interpreted languages) don't allow this. You can't access the memory cells of your variables directly. If you use your integer variable as a string a conversion will be done by the interpreter. '>>' and other functions know the endianness of the system and use it. That is even true for C.
Note that you can specify endianness when you use the pack function.
|
|---|