in reply to How do I just count any words from a file?

I'd just like to add a rule I learnt from my early days of Perl that can be used to choose between split and a regexp:

Use split when you know what you want to throw away, and a rexexp when you know what you want to keep.

There are times when it doesn't apply, but it nearly always does (as it does in this case).

  • Comment on Re: How do I just count any words from a file?