in reply to Counting and Filtering Words From File
Beyond that, suggestions below about improving your algorithm and utlizing Perl builtins seem to suffice.