in reply to Re: Re: Out of memory
in thread Out of memory

Oh, you are reading it in fine - line by line. But then you join all the lines together until you have read all the lines, before you count the words.

Why not count the words of the line just read, and then read in the next line?

As for your regex, you split on a space, a plus, a newline, a plus (again), a comma or a semi-colon. I think you want: /[\s,:]+/.

Abigail