Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to easily convert the pack function from little endian to big endian

by Tux (Monsignor)
on Aug 13, 2012 at 06:30 UTC ( #987045=note: print w/ replies, xml ) Need Help??


in reply to How to easily convert the pack function from little endian to big endian

If you control both ends, either use the alread mentioned "S>" or "S<" or the network versions "n" and "v" (see perldoc -f pack).

s A signed short (16-bit) value. S An unsigned short value. n An unsigned short (16-bit) in "network" (big-endian) order. v An unsigned short (16-bit) in "VAX" (little-endian) order.

I made an overview of those pack results here for one of my talks.


Enjoy, Have FUN! H.Merijn


Comment on Re: How to easily convert the pack function from little endian to big endian
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987045]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (17)
As of 2014-07-23 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (150 votes), past polls