http://qs321.pair.com?node_id=514185


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.