DB<38> use v5.10.0; DB<39> $var = 7; DB<40> @a = qw/ 4 6 7 9 3/; DB<41> print "yes" if $var ~~ @a; yes #### print "yes" if grep { $var == $_} @a;