use List::Util qw( any ); if (any { $a eq $_ } qw( ABA SCO ACC PHC GHF )) { .... }