you seem to miss that he's using constants, like so often in bit operations.
DB<44> use constant {upload =>0b1, getTicket =>0b10, downLoading=>0b +100}; DB<45> use warnings; use strict; say my $stats = upload | getTicket +| downLoading; 7 DB<46>
> The interesting thing with this thread is that I can't see how any of the replies (including GF's diversion) relate to the original post.
Now I'd be interested to know how I failed to answer exactly the question given in a concise way, especially given the level of the OP.
Plus explanation most others were lacking including the correct terminology and multiple further read-more links.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^7: How can I set a bit to 0 ?
by LanX
in thread How can I set a bit to 0 ?
by bartender1382
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |