in reply to Re^2: how to populate array with last 20 lines of file
in thread how to populate array with last 20 lines of file

Try it again, but like this:

#!perl -slw use strict; use File::Tail; my $logfile = File::Tail->new( name => 'logfile.txt' # daily logfile ,maxinterval => 5 # poll logfile every 5 seconds ,interval => 3 # wait 3 seconds before initial 'tail' ,tail => 5 # give me last 5 lines ); print while(defined($_ = $logfile->read));

Best Regards,
Shadowsong