#my $ref = tie *DIAG,"File::Tail",( # name => $Config->{'_'}{'DIAGFILE'}, # interval => 1, # wait at start # maxinterval => 10, # change to suit # adjustafter => 10 # change to suit #); my $fh = File::Tail->new( name => $Config->{'_'}{'DIAGFILE'}, interval => 1, # wait at start maxinterval => 10, # change to suit adjustafter => 10 # change to suit ); my $restart; #while (my $line = ) { while (my $line = $fh->read) { print $line; if ($line =~ /is higher than 5 seconds/) { . .