in reply to Decoding Mapped Bitfields

This is how I usually do it. But I am C-damaged and also wonder how you do it with maps etc.

my($actions) = " ABCDEFG"; my($bits) = 0x37; my($bplace) = 1; my($index) = length($actions); while(--$index >= 0) { substr($actions, $index, 1, " ") if !($bplace & $bits); $bplace += $bplace; } print $actions, "\n";