I found the file::tail module on cpan... 

#!/usr/bin/perl -w

use File::Tail;

my $log = "/usr/local/apache2/logs/access_log";

$file=File::Tail->new
(
        name=>$log,
        interval=>2,
        maxinterval=>10
);

while (defined($line=$file->read)) {
        print "$line";
}

It does exactly what I need. I can't seem to get this to work correctly
through cgi. Any ideas?

Thanks,
Max

-----Original Message-----
From: Max Clark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 4:44 PM
To: '[EMAIL PROTECTED]'
Subject: "tail -f" with cgi


Hi,

I am trying to write a cgi program to "tail -f" a log file. I have a perl
script that will open and print the log file, however it closes as soon as
it reads whatever is in the file at that particular time. How do I mimic
"tail -f" functionality?

Thanks,
Max

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to