use List::Util qw(none); my @types = ( 'Check In', 'Check Out' ); if ($username eq $security && none { $type eq $_ } @types ){}