in reply to Shortest -return index of element in array- sub
sub indexArray { 1 while $_[0] ne pop; @_-1; } [download]
sub indexArray(@) { 1 while $_[0] ne pop; $#_; } [download]