Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Extracting Bit Fields (Again)

by GrandFather (Saint)
on Oct 12, 2005 at 03:42 UTC ( [id://499356]=note: print w/replies, xml ) Need Help??


in reply to Extracting Bit Fields (Again)

use warnings; use strict; my $value = 162; my ($b1, $b2, $b3) = unpack 'b1b3b4', $value; print "$b1 $b2 $b3";

Prints 1 011 0100 which may not be what you expected. What would you like to see?


Perl is Huffman encoded by design.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found