Help for this page
use Bit::Manip qw(:all); use Test::More; ... } ... # your subs go below, not quoted here...
# INPUT VAL DESIRED OUTPUT # 0bKKKK_KKKK 0b0000_0000 0bKKK0_K000 ... for (0 .. 15) { is( bit_set_skip( 0x00, [0,1,2,4], $_), (($_ & 0x08)<<1) | (($_ & +0x07)<<0), "put a gap between the MSB and the lower three bits"); }