Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: One out of three ain't bad

by JamesNC (Chaplain)
on Oct 22, 2005 at 14:38 UTC ( #502210=note: print w/replies, xml ) Need Help??


in reply to One out of three ain't bad

Here is a simple example using the shift operator.
my $x = -2; my $y = 0; my $z = 1; my $t = 1; for( $x,$y,$z){ $t = $t<<1 if $_; } print "none set" if $t == 1; print "only one set" if $t == 2; print "more than 1 set" if $t > 2;

JamesNC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://502210]
help
Chatterbox?
[Discipulus]: uch; everytime i want to read some source code i finally choke against an XS..

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2016-12-05 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (78 votes). Check out past polls.