Here's one way
perl -e 'use List::Util qw|min|; $pos = 0; @a = qw|95 41 3 9 2|; %ha +shPos = map {$_=>$pos++} @a; print $hashPos{scalar min @a};' Prints 4
Celebrate Intellectual Diversity
In reply to Re: index of the minimum element of the array
by InfiniteSilence
in thread index of the minimum element of the array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |