Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: better array to hash conversion

by clueless newbie (Chaplain)
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!

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?
[Corion]: marto: Oh ;) Well, I think you did right - more time, even if not spent with the kids directly, is still more time for you.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-06-29 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (655 votes). Check out past polls.