in reply to Piping Tail and while loops

select can be used to check if a handle is ready to be read (but it doesn't work for pipes in Windows). Only call <TAIL> if select indicates data is waiting to be read.

As an aside, I don't see the reason to fork off tail instead of opening the log file in perl.

Replies are listed 'Best First'.
Re^2: Piping Tail and while loops
by matt.schnarr (Sexton) on Sep 01, 2004 at 22:04 UTC
    Thanks - I will give select a try!

    I need to read in the file via tail, as the file is consistantly being written to (the one I'm trying to read) so if I open it on my BSD box I am worried I will not get any new lines added to the file after the time of opening it.

    Matt