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;
In reply to Re: One out of three ain't bad
by JamesNC
in thread One out of three ain't bad
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |