in reply to reading a changing file

Doing multiple open and close statements is the correct way to go here. It clearly documents that the file might be changing in the interim 10 seconds wait.

You might considering doing a shared read lock using flock, but I doubt that it's a strong need for you nor that the other process would respect it.

Replies are listed 'Best First'.
Re^2: reading a changing file
by slogger (Initiate) on Jun 07, 2011 at 16:10 UTC

    Many thanks - wasnt sure if my method was too brute force and there was a more elegant way to do it!