Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: better array to hash conversion

by davido (Archbishop)
on Dec 11, 2012 at 18:41 UTC ( #1008366=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use List::MoreUtils 'first_index';
    my @array = qw( a b c d e f g h );
    print "Found 'd' at $found_ix.\n";
    output: Found 'd' at 3.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008366]
[shmem]: me sinks back into the armchair by the fire, smikes a pope and calls this a day.
[shmem]: just one proverb before dozing off: when dealing with a bear, hubris is suicidal
[shmem]: Old_Gray_Bear would nod, and go back to sleep, then - but he's been sleeping for a year now.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2018-03-19 20:43 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.