use List::Util 'reduce'; sub minindex { reduce { $_[$a] < $_[$b] ? $a : $b } 0 .. $#_ } my @g = (55, 88, 33, 6, 234, 234, 52, 6, 1324, 22, 1234); print minindex @g; # $g[7] == 6