Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: PERL Binary Data Handling

by Anonymous Monk
on Oct 05, 2012 at 20:55 UTC ( #997547=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     $ perl -le " print join q/ /, unpack q/(A4)*/, unpack q/B*/, pack q/B
    +33/, 1, 66 "
    1000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    
    $ perl -le " print join q/ /, unpack q/(A2)*/, unpack q/H*/, pack q/B3
    +3/, 1,66  "
    80 00 00 00 00
    
  2. or download this
    $ perl -le " print join q/ /, unpack q/(A2)*/, unpack q/H*/, pack q/B3
    +3/, join q//, 1, unpack q/B32/, 66  "
    9b 1b 00 00 00
    ...
    
    $ perl -le " print join q/ /, unpack q/(A4)*/, unpack q/B*/, pack q/B3
    +3/, join q//, unpack(q/B1/,1), unpack q/B32/, 66 "
    1001 1011 0001 1011 0000 0000 0000 0000 0000 0000
    
  3. or download this
    $ perl -le " print join q/ /, unpack q/(A4)*/, unpack q/B*/, pack q/B3
    +3/, join q//, unpack(q/B1/,1), unpack q/B32/, 66 "
    
    0001 1011 0001 1011 0000 0000 0000 0000 0000 0000
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997547]
help
Chatterbox?
[choroba]: ad readdir: 5.12 needed
[marioroy]: CORE::wait can block if another process reaps a worker from another class. MCE::Hobo takes care of that and transparently.
[Discipulus]: thanks choroba i'll update my answer
[Lady_Aleena]: Hello Discipulus, Corion, choroba, and marioroy...
[Corion]: Hi Lady_Aleena!
[Lady_Aleena]: marioroy, are you also writing a Meditation for this?
choroba o/
Discipulus adds tozzetti alle mandorle to the platter on the sideboard.
Lady_Aleena was checking #cbstream and saw the big announcement.
[marioroy]: Tie::IxHash can be shared. Also similar modules. I cannot wait to post a solution sharing Tie::File and iterating among workers.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2017-05-26 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?