The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm shooting in the dark here, but...
I have a hunch ord($byte) is what i'm looking for, but the byte i'm reading isn't yielding the value I expect it to, which could be a different problem... ...sounds to me like a problem related to the "endianness" of the data. Instead of using ord(), try using some form of unpack(). The protocol specification should specify the endianness (i.e. if it's big- or little-endian). acid06 perl -e "print pack('h*', 16369646), scalar reverse $=" In reply to Re: Reading (and parsing) a byte stream
by acid06
|
|