![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Named Bits in a 32-bit integerby BronzeWing (Monk) |
on Jul 31, 2002 at 19:27 UTC ( #186568=note: print w/replies, xml ) | Need Help?? |
I think the simplest way to do it is with the &, |, ^, and ~ operators. An example:
Prints "3" (that's WRITE and EXECUTE). -BronzeWing Update:
Just like that. The Secret to Fortune Cookies in One Line
In Section
Seekers of Perl Wisdom
|
|