in reply to tee -f?
This clears the end-of-file condition on the handle, so that the next <GWFILE> makes Perl try again to read something.seek(GWFILE, 0, 1);
If this still doesn't work, look into the POSIX module. POSIX defines the clearerr() method, which can remove the end of file condition on a filehandle. The method: read until end of file, clearerr(), read some more. Lather, rinse, repeat.for (;;) { for ($curpos = tell(GWFILE); <GWFILE>; $curpos = tell(GWFILE +)) { # search for some stuff and put it into files } # sleep for a while seek(GWFILE, $curpos, 0); # seek to where we had been }
There's also a File::Tail module from CPAN.
|
|---|