in reply to using vec() and unpack()
is rather something like this:my @charBits = split(//, unpack("b8", $temp));
But apart from that, you should test some value other than the tilde character, and make sure you figure out whether you want to use "b8" or "B8" as the formatting string for the unpack call.my @charBits = split(//, unpack("b8", $char));
As for doing 'unpack("b8", $temp)', it's hard for me to figure out what that actually does. Note that you get more output if you use "b*" there -- but that didn't help me at all, I still don't know what it's doing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using vec() and unpack()
by Gerard (Pilgrim) on Aug 16, 2003 at 04:52 UTC |