in reply to speeding up script that uses filehandles

Try changing your foreach loop to a while loop. The effect of that will be to read the file line-by-line instead of attempting to load the whole thing into memory before processing it.

  • Comment on Re: speeding up script that uses filehandles