Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: pack/unpack 6 bit fields.

by etcshadow (Priest)
on Aug 18, 2004 at 05:01 UTC ( [id://383856]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # to turn your $str into an array
    @array = map { vec($str, $_*6, 6) } 0..15;
    ...
    
    # or simply to access the $i-th item in the $str, directly:
    $read_item = vec($str, $i*6, 6) = $write_item;  # vec is an lvalue!
    
  2. or download this
    ------------
    :Wq
    Not an editor command: Wq
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://383856]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-05-30 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found