Don't ask to ask, just ask | |
PerlMonks |
Handling binaryby G109B (Initiate) |
on Sep 12, 2015 at 11:54 UTC ( [id://1141773]=perlquestion: print w/replies, xml ) | Need Help?? |
G109B has asked for the wisdom of the Perl Monks concerning the following question: I guess the answer to my problem lies somewhere in pack/unpack, but I find them very difficult to understand. I have this string: "139686DA20C1" which represents 48 bits (6 hex bytes). I know that the first 45 bits are my name, written as 9 x 5 bit chars where 00=A to 1A=Z, but I cannot print them without using 'if' cases for each group of 5 bytes (8 chars) I also need to be able to generate these strings. Is this the only solution ? Many thanks
Back to
Seekers of Perl Wisdom
|
|