sub array_index { @_{@_}=-1..@_; $_{$_[0]} } [download]
In reply to map in an avoid context by jmcnamara in thread Shortest -return index of element in array- sub by leons