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


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

If the contest is for an index and not the reverse index, then the above solution is correct. But the offerings that use pop will find the last match in the array rather than the first.
  • Comment on Re (tilly) 1: Shortest -return index of element in array- sub