Last try is good? Rather not (what about 55, 33 etc?)$test = 7; #(OK only when $test is 7,5 or 3) #OK, but... long print "OK\n" if ($test == 7 or $test == 5 or $test == 3); #NOT OK #print "OK\n" if ($test == (7 or 5 or 3)); #OK? print "OK\n" if ($test =~ /[753]/);
In reply to IF and some conditions by uksza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |