in reply to Re^5: promoting array to a hashin thread promoting array to a hash
Sorry ;). I was referring to the comment in the OP's code #reduces a file to a sorted list of unique words.
For the more general case your method is better.