Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Finding index of an entry in an Array

by sh1tn (Priest)
on Dec 07, 2007 at 03:18 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655572]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-18 20:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found