Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by MrNobo1024 (Hermit)
on Apr 02, 2001 at 04:41 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://68891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-26 01:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found