in reply to Re: converting artibrary binary data to numeric values
in thread converting artibrary binary data to numeric values
Like with unpacking from numbers it seems Perl first converts the raw binary data into a string representation of a gigantic decimal number, then it tries to unpack from that, giving bizarre results that do not correspond to the original byte order.
Also, it seems the "b" and "B" flags to unpack expect the value to be a string of 1's and 0's, not a number.
Please help me answer my original question. How do I convert a value which perl thinks is the scalar "\xd\xe\xa\xd\xb\xe\xe\xf" into a scalar with the numeric value 0xDEADBEEF ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: converting artibrary binary data to numeric values
by Corion (Patriarch) on Oct 01, 2012 at 20:17 UTC | |
by markle (Initiate) on Oct 01, 2012 at 21:27 UTC | |
by markle (Initiate) on Oct 01, 2012 at 22:08 UTC | |
by Corion (Patriarch) on Oct 02, 2012 at 07:18 UTC | |
by markle (Initiate) on Oct 02, 2012 at 20:31 UTC | |
by afoken (Chancellor) on Oct 02, 2012 at 06:21 UTC |