Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Shortest -return index of element in array- sub

by MeowChow (Vicar)
on Mar 24, 2001 at 23:59 UTC ( #66890=note: print w/ replies, xml ) Need Help??


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

sub i { pop eq $_[0] ? @_-1 : (), $#_ ? &i : () }
Ahhhh, more recursion...

ps. This is why I used @_-1 instead of $#_


Comment on Re: Re: Shortest -return index of element in array- sub
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://66890]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-09-21 14:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (172 votes), past polls