in reply to Finding the index of a specific element in an array.

On the most recent perl's you can use each:

my @array = (2,4,7,5,8);; my($i, $v ) = each @array until $v == 7;; print $i;; 2

On older perl's:

my @array = (2,4,7,5,8);; my $i = 0;; ++$i until $array[ $i ] == 7;; print $i;; 2

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?