Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Arrays & Hashes

by friedo (Prior)
on Aug 18, 2005 at 18:48 UTC ( #484919=note: print w/replies, xml ) Need Help??


in reply to Arrays & Hashes

You can create hashes of arrayrefs easily:

my %hash = ( foo => [ 0,1,2 ], bar => [ 7,8,9 ] );

To access individual elements:

my $element = $hash{foo}[2];

For more, see perldsc.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2020-05-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (168 votes). Check out past polls.

    Notices?