in reply to Sorting hash of hashes by values

print $value->{$key}, "\n";

But why doesn't this print statement from the OPed code work?

Because in the  $value->{$key} expression, the  -> operator (see The Arrow Operator in perlop) expects the scalar  $value to be a reference to something, and the  {$key} part of the expression sez that that something is a hash (due to the  {} curly braces) for which the  $key scalar will be used as a key.

However, in the  @HoH hash as defined in the OP, all the values of the hash referenced by  $HoH{0} are humble numbers like 4 or 2 and possess no referential mojo.