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.
In reply to Re^3: Practical Example of Converting Packed Value
by ikegami
in thread Practical Example of Converting Packed Value
by Jim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |