in reply to Bit order


The following statements reverse bit order for big and little endian longs. Test them with your data to see which one is required.
#!/usr/bin/perl -l use strict; my $dword = pack "N", 0x01020304; print unpack "V", pack "b8b8b8b8", unpack "B8B8B8B8", $dword; print unpack "N", pack "b8b8b8b8", unpack "B8B8B8B8", $dword;
If this doesn't work could you give an example of four bytes that you read and the integer that you expect.

--
John.