in reply to Re: lsearch for perl?
in thread lsearch for perl?

or
use List::MoreUtils qw( first_index ); my $index = first_index { $item eq $_ } @list; # Returns -1 if no such item could be found.