http://www.perlmonks.org?node_id=462857

uksza has asked for the wisdom of the Perl Monks concerning the following question:

Hello Wise Monks,

Is it good way?
$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]/);
Last try is good? Rather not (what about 55, 33 etc?)
Is any good (not switch/case) method to test it?

Thanx a lot
uksza