in reply to swap binary data from big to little Endian
I checked with 'od -l' (on a Unix system):Position(bytes) Datatype 0 - 7 long 8 - 15 long 16 - 23 long 24 - 31 long 32 - 39 long 40 - 43 int 44 - 51 long
I only know that the 6th value is 2000, which is now the 11th value, so I get the impression that it is expected that a long is only 4 bytes, does that make any sense ?0000000 0 2000 0 200 0000020 0 455800 0 4 0000040 0 8 2000 275 0000060 281946600 167772160 0000065
Outputmy @vals = unpack("N*", $binrec ) ; print "@vals" ;
I get the same values as od except for the last value!0 2000 0 200 0 455800 0 4 0 8 2000 275 281946600
|
|---|