in reply to Sorting and ranking

why do you get the keys and not the values if you want to rank the keys based on the values?

Replies are listed 'Best First'.
Re^2: Sorting and ranking
by Anonymous Monk on Jan 21, 2018 at 12:09 UTC
    But my sorting is actually based on the values, or?
    sort { $data{$keys[$b]} <=> $data{$keys[$a]}

      All i meant was why not take the values iso the keys and sort those.

        I need to keep track of both so as to print them in the end. But I do sort based on the values, I don't think this is the problem.