in reply to Re^2: algorithm question: want to sort keys of hash by their values.
in thread algorithm question: want to sort keys of hash by their values.

Two errors: my $keys should be my @keys, and it's sorting by descending key while it should sort by descending value.