in reply to Getting keys of a hash element
foreach $key (sort(keys(%hash))) { print "Key = $key, value= $hash{$key}\n"; }
The whole reference can o' worms looks somethin like this:
There's probably about a million typos in there, but someone will correct me. =) That'll print out a line with the keys contained in the hash referred to by the values of %hash. Not sure if this is what you want, I'm guessing the first solution is closer to what you mean...foreach $key (sort(keys(%hash))) { print join(/ /,keys(%{$hash{$key}}),"\n"; }
enjoy
Trinary
|
|---|