in reply to Reading line from file only when there is a new line (live)
You want to take a look at File::Tail, which implements methods to follow a file.
The documentation mentions several ways how you can use the filehandle returned by File::Tail, you can either use it as an IO handle, complete with select() support, or use the read() method, which tries to have near 0% CPU usage and will return whenever a new line is available.
|
|---|