Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^6: pack/unpack 6-bit fields. (insanity)

by tye (Sage)
on Aug 18, 2004 at 21:55 UTC ( #384125=note: print w/replies, xml ) Need Help??

in reply to Re^5: pack/unpack 6-bit fields. (Different types of sanity)
in thread pack/unpack 6 bit fields.

My numbers look correct to me.

print unpack 'B*', 'twelve bytes'; ## hand spaced 001011 101110 111010 100110 001101 100110 111010 100110 000001 000100 011010 011110 001011 101010 011011 001110

You show code containing 'B*' but the bits that you show are from using 'b*'. That is why you can match the 'b*' case against it.

Trying to match the 'B*' against that string gives one of the less-sane results I mentioned (where the bit orders are mismatched).

To be extra clear, using 'B*' would result in each group of 8 bits being reversed (it doesn't reverse the whole bit string), which results in different 6-bit chunks not just reversed 6-bit chunks (so neither of your cases cover it).

- tye        

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://384125]
[1nickt]: ++YourMother (Grammar Vigilante of Bristol)
[Lady_Aleena]: Um, how does grep do multiline? print "$file:$_" if grep { /get_(array|hash| data)\(.+\)/ } $_; only returns the same 18 lines the command line grep does.
[Lady_Aleena]: my scratchpad has what I have so far.
[choroba]: what do you mean by multiline?
[Discipulus]: thanks 1nickt!
[choroba]: grep is a filter, it selects elements from a list based on a boolean condition
[moritz]: you need to read the file in one go to do a multiline regex match
[erix]: ha ha, I like the Vigilante
[Lady_Aleena]: Forget it. I'm getting angry with it.
[Lady_Aleena]: I'll just have to search for the files using the subs and open them up.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2017-05-23 19:53 GMT
Find Nodes?
    Voting Booth?