Here's another solution, using first (to stop searching as soon as possible):
use List::Util 'first'; print "OK\n" if defined first { $test == $_ } (7, 5, 3);
the lowliest monk
In reply to Re: IF and some conditions
by tlm
in thread IF and some conditions
by uksza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |