in reply to
Re: Re: Shortest -return index of element in array- sub
in thread Shortest -return index of element in array- sub
Now that I've taken a closer look, this is the shortest iterative version I could find (and also the shortest I could make it and have it run under strictures and warnings, although those aren't really prerequisites
I'd say that's pretty obfuscated, too. It can be done
in a couple fewer characters recursively, if you use a one-character subroutine name and eliminate any unnecessary whitespace. I'd like to know hoe to do it in fewer iteratively, but I just can't figure anything out. Please point it out to me if there's a way.