in reply to Accessing deeply burried arrays of hashes

Suggestion. Dereference one at a time as you enter the loop. The logic will be simpler, the syntax saner, and by avoiding nested hash lookups your code will be faster as well:
foreach my $key (sort keys %tophash) { my $value1 = $tophash{$key}; foreach my $subkey (sort keys %$value1) { my $value2 = $value1->{$subkey}; foreach my $val (sort @$value2 ) { print "$val\n"; } } }
UPDATE
Oops, forgot to do the second hash lookup. Fixed.