Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Trouble with Hashes of Arrays

by mfriedman (Monk)
on Aug 14, 2002 at 20:29 UTC ( #190219=note: print w/replies, xml ) Need Help??


in reply to Trouble with Hashes of Arrays

There really isn't any such thing as a hash of arrays in Perl. Your hash must contain references to arrays. You can do that by assigning an anonymous array reference:

$hash{'foo'} = [ 1, 2, 3, 4 ];

Or by assigning a reference to an existing array:

$hash{'foo'} = \@bar;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2021-06-13 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (57 votes). Check out past polls.

    Notices?