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 MrNobo1024 (Hermit)
on Apr 02, 2001 at 04:41 UTC ( #68891=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 aindex { grep$_[$_+1]eq$_[0],0..@_-2 }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2016-09-28 23:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (541 votes). Check out past polls.