my @sorted_words = @HashA{@sorted_scores}; #### push(@sorted_words = $HashA{$_}; #### push @sorted_words, $HashA{$_};