go ahead... be a heretic | |
PerlMonks |
Re: Log file tailingby matija (Priest) |
on May 17, 2004 at 09:27 UTC ( [id://353902]=note: print w/replies, xml ) | Need Help?? |
Doing select for ordinary files won't do you any good. Disk files (as opposed to sockets and pipes) are always "ready for reading". I suggest you look at the code for File::Tail. While I never wrote any hooks to tell the calling program when there was no traffic in the file, I do handle it internaly and you could add it to the code fairly easily. Send me a patch once it's done, and if it's fairly clean, I'll include it in the next release. (Note, I suggest a callback for implementing that).
In Section
Seekers of Perl Wisdom
|
|