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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Handling binary
by Eily (Monsignor) on Sep 12, 2015 at 14:29 UTC | |
|
Re: Handling binary
by flexvault (Monsignor) on Sep 12, 2015 at 13:52 UTC | |
|
Re: Handling binary
by Anonymous Monk on Sep 12, 2015 at 15:26 UTC | |
by Anonymous Monk on Sep 12, 2015 at 16:19 UTC | |
by G109B (Initiate) on Sep 14, 2015 at 09:30 UTC | |
|
Re: Handling binary
by Anonymous Monk on Sep 13, 2015 at 22:32 UTC |