Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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!

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 taking refuge in the Monastery: (2)
As of 2016-08-30 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (410 votes). Check out past polls.