Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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??

Help for this page

Select Code to Download


  1. or download this
    perl -MFile::Tail -E '$f = File::Tail->new(q[/var/log/foo/bar.log]); p
    +rint $l while $l = $f->read'
    
  2. or download this
    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'
    

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 browsing the Monastery: (10)
As of 2014-11-26 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (165 votes), past polls