Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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)};


Comment on Re: Finding index of an entry in an Array
Download Code

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: (6)
As of 2015-05-03 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (70 votes), past polls