my @vals = sort {$b <=> $a } map { values %{$hoh->{$_}} } keys %$hoh; my ($one, $two, $three) = @vals[0..2];