$tophash{$value1}{$value2} = ... #### foreach $subsubkey (sort @{$tophash{$value}{$value2}} )