#!/usr/bin/perl -w use strict; use File::Tail; my $log = "/usr/local/apache2/logs/access_log"; my $file=File::Tail->new ( name=>$log, interval=>2, maxinterval=>10 ); while (defined(my $line=$file->read)) { print "$line"; }
In reply to Re: How to read last lines from file?
by zentara
in thread How to read last lines from file?
by httpd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |