in reply to iterate through a hash with two keys
Not sure what you want ...
... if $label should be variable, try
print $hash{$_}{$label} for keys %hash
Update:
or shorter
print $_->{$label} for values %hash
Cheers Rolf
( addicted to the Perl Programming Language)
errata
s/values/keys/ in first expression
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: iterate through a hash with two keys
by fionbarr (Friar) on Apr 29, 2013 at 17:45 UTC | |
by BillKSmith (Monsignor) on Apr 30, 2013 at 02:12 UTC | |
by LanX (Saint) on Apr 29, 2013 at 17:50 UTC | |
by fionbarr (Friar) on Apr 29, 2013 at 18:32 UTC | |
by LanX (Saint) on Apr 29, 2013 at 18:38 UTC |
In Section
Seekers of Perl Wisdom