in reply to sort hash by value
But as to your main point of the sort not working: You're sending in the values but treating them like keys and trying to do a lookup.
@reportnL = sort { $total_o{$a} <=> $total_o{$b} } values (%total_o{$hero});
Change it to
@reportnL = sort { $total_o{$a} <=> $total_o{$b} } keys %total_o ;
UPDATE: Just noticed his was my 500th post.
|
|---|