http://www.perlmonks.org?node_id=68891


in reply to Re: Shortest -return index of element in array- sub
in thread Shortest -return index of element in array- sub

sub aindex { grep$_[$_+1]eq$_[0],0..@_-2 }