How do I monitor perl script from php
<p>I'm have a long-running perl script that outputs the percentage complete.  How do I show the completion status real-time on a php page?</p>

<p><strong>Example:</strong></p>

<p>perl:</p>

<pre><code>my $i = 0;
for $i (1 .. 6) {
    print "$i\n";
    sleep 1;
}
print "script end\n";
exit;
</code></pre>

<p>php:</p>

<pre><code>echo passthru('perl testprint.pl');
</code></pre>

<p>This works to display the output, but not real-time.</p>
