$ perl -MList::Util -E 'say "Yes" if List::Util::any { $_ == 42 } @{[qw/1 3 42 5/]}' Yes