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 Anonymous Monk
on Dec 07, 2007 at 03:41 UTC ( #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
Node Status?
node history
Node Type: note [id://655575]
help
Chatterbox?
[erix]: 2001 :)
[erix]: (I have the wp pages open :))
[talexb]: 2001 sounds about right .. got myself a separate box just to run Linux on. Seriously clueless.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2018-07-17 17:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (374 votes). Check out past polls.

    Notices?