in reply to Monitoring a file which is constantly being written to.
open T, '-|', 'tail', '-f', $file; while (<T>) {}
Note that, barring serious system failure or ^C, this loop will never end.
If you can't stand that, then you should just leave the file open, then once in a while (between sleeps, perhaps) call:
seek FILE, 0, 1; # clear EOF condition while (<FILE>) {}
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Monitoring a file which is constantly being written to.
by creutzfeldt (Novice) on Jun 20, 2003 at 23:42 UTC | |
|
Re: Re: Monitoring a file which is constantly being written to.
by devslashneil (Friar) on Jun 20, 2003 at 03:38 UTC | |
by BrowserUk (Patriarch) on Jun 20, 2003 at 03:43 UTC | |
by devslashneil (Friar) on Jun 20, 2003 at 03:41 UTC |