my $flag = "\r"; foreach my $bit ( 0 .. 4 ){ printf "Bit %d: %s\n", $bit+1, ( ord($flag) & 2**$bit ? "on" : "off" +); }
In reply to Re: Flipping bits and using flags
by davidrw
in thread Flipping bits and using flags
by BMaximus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |