if ( any { $_ eq $foo } @list ) { } #### if ( first { ! defined $_ } @list ) { # Does not get called if it matches } if ( any { ! defined $_ } @list ) { # Does get called it if matches }