since this question hasn't been answered yet here a variation for finding the first idx!
%pos= map { $_=>$i++ } reverse @input;
If you need it more than once, then the overhead for building a hash will easily pay off.
Cheers Rolf
In reply to Re^2: Get Position of Element in an array
by LanX
in thread Get Position of Element in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |