in reply to Re^2: Practical Example of Converting Packed Value
in thread Practical Example of Converting Packed Value
Please feel free to show me how you would do it using bitwise math.
That's what the second snippet does. First, unpack 's' is used to convert the bytes representing a number into something Perl understands to be a number. Then bit math is performed to extract each of the fields.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Practical Example of Converting Packed Value
by Jim (Curate) on Dec 01, 2008 at 02:02 UTC | |
by BrowserUk (Patriarch) on Dec 01, 2008 at 02:40 UTC | |
by ikegami (Patriarch) on Dec 01, 2008 at 04:00 UTC |