No such thing as a small change | |
PerlMonks |
I'm looking for the faster way to convert char 2 Bin and Bin 2 char (8bits)by DarkGoth (Acolyte) |
on Jan 25, 2001 at 22:35 UTC ( [id://54317]=perlquestion: print w/replies, xml ) | Need Help?? |
DarkGoth has asked for the wisdom of the Perl Monks concerning the following question: I've seen many means to return the bin value of an integer and a question came to me ... How can i convert a char 2 bin and bin 2 char? typing char2bin(a) --> 001000001 (not 1000001) I have found some solutions to this one but i guess there's a better one ... i guess in one line. I have made some test for the contrary : bin 2 char, but a problem came to me : it returns me the ascii value. I have made a pack "C" then ... but i'd like a quicker and easier solution. so, if you'v got an idee ... i would be thanxfull :)~
Back to
Seekers of Perl Wisdom
|
|