There's more than one way to do things | |
PerlMonks |
Re: I'm looking for the faster way to convert char 2 Bin and Bin 2 char (8bits)by Fixer (Acolyte) |
on Jan 26, 2001 at 03:28 UTC ( [id://54424]=note: print w/replies, xml ) | Need Help?? |
To get the byte (char) representation of a bit string: $char = pack("b8","01010101"); To get the bit_string of a char/byte: $bit_string = unpack("b8",$char);
In Section
Seekers of Perl Wisdom
|
|