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

Re^2: Parse Log File As Written

by duff (Parson)
on Sep 24, 2007 at 13:40 UTC ( [id://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!

    -Alan

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-03-19 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found