<?xml version="1.0" encoding="windows-1252"?>
<node id="994632" title="Re: Read log which is being updated continuisly" created="2012-09-20 07:13:39" updated="2012-09-20 07:13:39">
<type id="11">
note</type>
<author id="298378">
Arunbear</author>
<data>
<field name="doctext">
You may need to adjust the parameters you pass to new(). E.g. with
&lt;code&gt;
perl -MFile::Tail -E '$f = File::Tail-&gt;new(q[/var/log/foo/bar.log]); print $l while $l = $f-&gt;read'
&lt;/code&gt;
I had to wait 9 seconds before output was produced. But with
&lt;c&gt;
perl -MFile::Tail -E '$f = File::Tail-&gt;new(name=&gt; q[/var/log/foo/bar.log], tail=&gt;10, maxinterval=&gt;0.5); print $l while $l = $f-&gt;read'
&lt;/c&gt;
The output appears right away.
</field>
<field name="root_node">
994616</field>
<field name="parent_node">
994616</field>
</data>
</node>
