$hash{me}{sorter_total}=10; $hash{john}{sorter_total}=30; $hash{landon}{sorter_total}=20; $hash{jimmy}{sorter_total}=40; foreach my $user ($hash) { @sorted = (sort {$b <=> $a} keys %{$hash{$user}{sorter_total}}); } foreach (@sorted) { print "$_\n"; }