my @taxR = ("PLRV1", "PMTVS", "PVXHB"); my $curEntry = "PMTVS"; if($curEntry ~~ @taxR){ print "do rest of stuff"; }