in reply to
Re: Re: Perl Destroys Interview Question
in thread Perl Destroys Interview Question
Here are the requirements I was given...
The goal of the program is to count the occurrences of all words in a file, and write this count into a new file.
- The input file will contain 1 word per line (lines will be terminated by the newline character), and the file will contain an arbitrary number or lines.
- The file will be terminated by an end of file character.
- The word count must be case insensitive, as there may be varying case throughout the file.
- The output file must write each word once, and include the number of occurrences of that word on the same line.
- The lines in the output file must be sorted in ascending order.