my @sorted_keys = sort{$hash{$a}->[1] <=> $hash{$b}->[1]} keys %hash;