in reply to Flipping bits and using flags
my $flag = "\r"; foreach my $bit ( 0 .. 4 ){ printf "Bit %d: %s\n", $bit+1, ( ord($flag) & 2**$bit ? "on" : "off" +); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Flipping bits and using flags
by GrandFather (Saint) on Mar 23, 2006 at 23:04 UTC |