in reply to Parse Log File As Written

Another way of tackling this problem is to have the program write its log-output not to a file but to a Perl-script and have the script immediately write it to a file (so not data get lost) and then parse the new info and do what needs to be done with it.

It avoids having to lock the file or try and detect when new info is (completely) added.

Of course it assumes (big "IF") that your program can write its log-output to STDOUT or STDERR where you can easily capture it. I'm not sure that on Windows you can replace a (log-)file by a script as you can do under Linux or such.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James