my @final_list = sort { $b->[1] <=> $a->[1] } @names_and_rates; # $b first for descending order