Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 rifling through the Monastery: (3)
As of 2016-07-25 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (222 votes). Check out past polls.