in reply to IF and some conditions

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