Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Trouble with Hashes of Arrays

by mfriedman (Monk)
on Aug 14, 2002 at 20:29 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://190219]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found