Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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

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

Help for this page

Select Code to Download

  1. or download this
    bytes:  765432 10 7654 3210 76 543210
    fields: 543210 54 3210 5432 10 543210
    bytes:  012345 67 0123 4567 01 234567
    fields: 012345 01 2345 0123 45 012345
  2. or download this
    my @fields=
         unpack "C*",    # 16 6-bit numeric values
         unpack "B6"x16, # 16 6-character base-2  strings
         pack   "C*",    # string of 16 bytes, each  holding a 6-bit value
         @fields;        # 16 6-bit numeric values

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://383881]
[1nickt]: I found that when using Perlbrew as recommended, with cpanminus in the system perl lib, such tests were failing to detect the data about the perl that was the install destination.
[1nickt]: Config works properly, thank you. I has first followed an example from the doc using eval. THis is much nicer.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-10-18 15:41 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (249 votes). Check out past polls.