njcodewarrior has asked for the wisdom of the Perl Monks concerning the following question:
Wise Monks,
The background to this current post is located in a previous node:
In the hopes of finding a simple solution to this problem, I'd like to write an application using a while (1) loop that periodically checks for either a new log file OR if a log file is currently being updated. A new log file is written each time an AUV calls in and is given a unique timestamp.
Checking for a new log file is easy (I think I'll use BrowserUK's solution). What I'd like to know is how to determine if a log file is currently being writen to and, if it is, how to read in and parse the new lines as they are being written?
Thanks in advance for your help.
The background to this current post is located in a previous node:
In the hopes of finding a simple solution to this problem, I'd like to write an application using a while (1) loop that periodically checks for either a new log file OR if a log file is currently being updated. A new log file is written each time an AUV calls in and is given a unique timestamp.
Checking for a new log file is easy (I think I'll use BrowserUK's solution). What I'd like to know is how to determine if a log file is currently being writen to and, if it is, how to read in and parse the new lines as they are being written?
Thanks in advance for your help.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Is a file currently being modified?
by davido (Cardinal) on Aug 16, 2005 at 23:39 UTC | |
Re: Is a file currently being modified?
by BrowserUk (Patriarch) on Aug 17, 2005 at 01:07 UTC | |
Re: Is a file currently being modified?
by Roger (Parson) on Aug 17, 2005 at 05:08 UTC |
Back to
Seekers of Perl Wisdom