in reply to How can I find the index of the biggest element in an array?
use List::Util qw /reduce/; my @arr= qw/7 6 4 90 5 7/; my $index = reduce {$arr[$a] > $arr[$b] ? $a : $b} (0 .. $#arr); print "$index\n"; [download]