in reply to Re: lack an adequate understanding of (at least) the seek function
in thread lack an adequate understanding of (at least) the seek function

mikeraz,

Thanks, man!

I learned a few things from your reply and the combination of your reply and jeffa's was real helpful as he showed a whole different approach while your approach was conducive to my attempt.

Though, I confess to not understanding how excessive line numbers would be removed from the original file. Like if it had 30 lines and a limit was 10, I can see how the array would have the desired ten lines. But, I don't see how the 30 line file wouldn't end up having 40, with the array's "contribution" preceding what is already there.

I'll test it out.

Thanks again...

o2
  • Comment on Re^2: lack an adequate understanding of (at least) the seek function

Replies are listed 'Best First'.
Re^3: lack an adequate understanding of (at least) the seek function
by mikeraz (Friar) on May 24, 2005 at 12:49 UTC

    You're correct, the code as shown will append. That's easy enough to correct though. Replace the >> with a single > in your open of the output file.