in reply to Re^2: Accessing hash elements inside another hash
in thread Accessing hash elements inside another hash
In general, accessing all key/value pairs in a HoH will look like:my %Data = getQueues(); while (my ($key,$value) = each(%Data)){ #print "$key = $value \n"; for(my ($k,$v) = each($Data{$key}->{'Queues'})){ print "$k = $v \n"; } }
foreach my $key (keys(%HoH)){ foreach my $otherKey (keys($HoH{$key})){ my $value = $HoH{$key}{$otherKey}; my $result = &DO_SOMETHING($value); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Accessing hash elements inside another hash
by shmem (Chancellor) on Mar 11, 2009 at 23:08 UTC |