in reply to Out of memory problem when copying contents of file into array

You don't have to read the whole file in, just to throw away everything except that last 100 lines. Instead:

How to read a file in backwards?

  • Comment on Re: Out of memory problem when copying contents of file into array