use List::Util qw(first); first { $_ eq $needle } @list and say "Found!";