in reply to finding index number in an array

This is the simplest way I could find to do this. Do you think this will be fast enough for large N?
my @list = qw(just remember in perl there's more than one way to do it +, not that you should do it any way.); my $i = 0; my %hash = map { $_ => ++$i } @list; my @search = ('to','just', 'should', 'one'); my @indices = grep { $hash{$_} } @search; print 'matches ' . join (", ", map { $_ => ord()-97 } map { (a...z)[$h +ash{$_}-1] } @indices);