Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^2: Parse Log File As Written

by duff (Parson)
on Sep 24, 2007 at 13:40 UTC ( #640716=note: print w/replies, xml ) Need Help??

in reply to Re: Parse Log File As Written
in thread Parse Log File As Written

Does your program need to do other work while waiting for the logfile to update? If not, I think you really want esper's suggestion of File::Tail.

Replies are listed 'Best First'.
Re^3: Parse Log File As Written
by alanonymous (Sexton) on Sep 25, 2007 at 01:45 UTC
    No, the script wouldn't need to do anything while it is waiting for an update to the log file. My only concern is if the script performs an action based on an update to the log, but the action is still being executed while the next update occurs. Will the File::Tail execute multiple instances of the parsing conditions if updates occur too frequently? So if two updates occur at almost the same exact time, but it takes ~100ms for the execution of the parsing code and other actions, will that cause a problem?

    The File::Tail does seem ideal IF it can handle fast updates.

    Thanks for all the advice! Much appreciated!


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://640716]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-10-22 14:31 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (85 votes). Check out past polls.