Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Finding index of an entry in an Array

by Anonymous Monk
on Dec 07, 2007 at 03:41 UTC ( [id://655575]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -wMstrict
    -e "my @repo = qw(foo bar qux bar zot);  my %repo_index;
    $repo_index{$repo[$_]} = $_ for reverse 0 .. $#repo;
    print $repo_index{bar};"
    1
    

Log In?
Username:
Password:

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

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

    No recent polls found