in reply to How do I find the index of a specific array value?

@array = (...some 1_000_000 element array...); $search_for = "blah"; my $index = 0; while ( $array[$index] != $search_for ) { $index++ }

Originally posted as a Categorized Answer.