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


in reply to Shortest -return index of element in array- sub


Or maybe this:
sub indexArray{ while (@_) { return @_-1 if $_[0] eq pop } }

John.
--

Update: Just saw ChOas' post.