Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How do we access hash of array in a subroutine sent as reference. Is it something like this
Regardssub foo (){ my $hash_ref = shift; foreach my $key (keys %$hash_ref){ foreach my $val(@${$$hash_ref{$key}}){ print $val . "\n"; } } }
Janitored by Arunbear - added code tags, as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hashes of arrays problem
by reneeb (Chaplain) on Apr 13, 2005 at 15:26 UTC | |
|
Re: Hashes of arrays problem
by osunderdog (Deacon) on Apr 13, 2005 at 19:44 UTC | |
|
Re: Hashes of arrays problem
by sh1tn (Priest) on Apr 13, 2005 at 15:59 UTC | |
|
Re: Hashes of arrays problem
by tlm (Prior) on Apr 13, 2005 at 15:42 UTC |