Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: Parse Log File As Written

by duff (Vicar)
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
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 imbibing at the Monastery: (9)
As of 2016-10-26 15:33 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (342 votes). Check out past polls.