Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Using an array in a hash

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.