Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Finding index of an entry in an Array

by sh1tn (Priest)
on Dec 07, 2007 at 03:18 UTC ( #655572=note: print w/ replies, xml ) Need Help??


in reply to Finding index of an entry in an Array

{map($_ eq 'bar' && last || $index++, @repo)}; #or {grep(/^\Q$input\E$/ && last || $index++, @repo)};

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2016-06-27 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.