in reply to Re: Re: Shortest -return index of element in array- sub
in thread Shortest -return index of element in array- sub
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.sub indexArray3{ 1while$_[0]ne pop;$#_ }
Chris Stith
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 4: Shortest -return index of element in array- sub
by tilly (Archbishop) on Apr 04, 2001 at 18:41 UTC | |
by mr_mischief (Monsignor) on May 31, 2001 at 02:17 UTC |