[Dub-pm] Quick pack question.

Aidan Kehoe kehoea at parhasard.net
Tue Oct 12 09:48:21 CDT 2004


How do I take a string formated like so, bitwise-speaking; 

11111112 22222233 33333444 55556666 ...

(that is, the first seven bits of the first octet correspond to the first
character, the last bit of the first octet concatenated with the first six
of the next correspond to the second character ...) and convert it into a
Perl string? I can do it algorithmically, but something tells me unpack()
_should_ have the capability to do this. I've yet to have an eureka moment
from reading the docs, though. 

-- 
Like the early Christians, Marx expected the millennium very soon; like
their successors, his have been disappointed--once more, the world has shown
itself recalcitrant to a tidy formula embodying the hopes of some section of
mankind. (Russell)


More information about the Dublin-pm mailing list