Realtime Output: NPH Mode
#!/usr/bin/perl -w

use CGI qw(:standard -nph);
use CGI::Carp qw(fatalsToBrowser);

$| = 1;

open(GROW, "<growfile") || die "Cannot open growfile!\n";
print header, start_html("File Change Tracker!");

while(1)
{
    while (<GROW>)
    {
         s/&/\&amp;/g;
         s/</\&lt;/g;
         s/>/\&gt;/g;
         print pre($_);
         sleep(1);
    }
}
          

print end_html;
############################################################################


#!/usr/bin/perl -w

use IO::Handle;
open(GROW, ">growfile") || die "Cannot open growfile!\n";
chmod 0777, "growfile";

GROW->autoflush;
@L = (1..10000); 

foreach (@L)
{
   print GROW "$_\n";
   print "$_\n";
   sleep 3;
}