No such thing as a small change | |
PerlMonks |
Re: further subdivision of unpack resultby BrowserUk (Patriarch) |
on Apr 13, 2011 at 03:53 UTC ( [id://899096]=note: print w/replies, xml ) | Need Help?? |
Why are you converting to bits only then to have to convert back to bytes? Reading between the lines of your post, you could use this to get at the bytes:
and then just access the them via the array. But then, looking at the way you are numbering your 4 bytes: (byte2, byte1, byte4, byte3) it seems likely that each group of 4 bytes is actually a little endian 32-bit value. In which case, you can skip the bytes step also and do:
It's a lot simpler to use the built-in facilities :) Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|