Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Read log which is being updated continuisly

by Arunbear (Parson)
on Sep 20, 2012 at 11:13 UTC ( #994632=note: print w/ replies, xml ) Need Help??


in reply to Read log which is being updated continuisly

You may need to adjust the parameters you pass to new(). E.g. with

perl -MFile::Tail -E '$f = File::Tail->new(q[/var/log/foo/bar.log]); p +rint $l while $l = $f->read'
I had to wait 9 seconds before output was produced. But with
perl -MFile::Tail -E '$f = File::Tail->new(name=> q[/var/log/foo/bar.l +og], tail=>10, maxinterval=>0.5); print $l while $l = $f->read'
The output appears right away.


Comment on Re: Read log which is being updated continuisly
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (16)
As of 2015-07-07 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls