Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: better array to hash conversion

by clueless newbie (Hermit)
on Dec 11, 2012 at 12:23 UTC ( #1008290=note: print w/ replies, xml ) Need Help??


in reply to better array to hash conversion

@hash{@array}=(0..$#hash};

Should really read

@hash{@array}=(0..$#array};

Thanks for the catch, perltux!


Comment on Re: better array to hash conversion
Select or Download Code
Re^2: better array to hash conversion
by perltux (Scribe) on Dec 11, 2012 at 12:48 UTC
    Shouldn't that be $#array rather than $#hash ?

      Absolutely!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (19)
As of 2015-07-02 17:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls