Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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
Replies are listed 'Best First'.
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 drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2015-07-28 11:04 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 (254 votes), past polls