Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Using an array in a hash

by friedo (Prior)
on Jan 22, 2005 at 20:11 UTC ( #424271=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using an array in a hash
in thread Using an array in a hash

There are two ways to dereference an array, depending on what you need to do. See perlref and perlreftut for the details.

In short, to dereference an entire array, use:

my @array = @{ $vendor_size_hash{$j} };
To dereference a single element in the array, use:
my $el = $vendor_size_hash{$j}[$number];

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-12-09 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (37 votes). Check out past polls.

    Notices?