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"; [download]
Prints 1 011 0100 which may not be what you expected. What would you like to see?