in reply to Re^2: Looping through hash of hashes
in thread Looping through hash of hashes
What if you did not know the names of the keys
Then use the keys builtin to find them out. Something like this:
for my $file (sort keys %messagebin) { print "File $file:\n"; # $messagebin{$file} is a hashref, so: my @subkeys = sort keys %{$messagebin{$file}}; foreach my $subkey (@subkeys) { print "\t$subkey = $messagebin{$file}{$subkey}\n"; } }
|
|---|