Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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.


Comment on Re^2: Parse Log File As Written
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
Node Status?
node history
Node Type: note [id://640716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-11-22 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (122 votes), past polls