in reply to Re: Word Counting
in thread Word Counting

I would reccomend $wordhash{lc $word}++; as opposed to $wordhash{$word}++; if you're not worried about case-sensitivity, so you don't end up with:

To: 50
to: 23

Also, if you're going to split on \s+ as everyone seems to be suggesting, don't forget you're going to have to $word =~ s/\W//g to get rid of those unsightly punctuation marks.

--
perl: code of the samurai