in reply to Re^7: trying to implement file tail with regular expression
in thread trying to implement file tail with regular expression

same thing once it reach while (my $line = $fh->read) it stop. :(

  • Comment on Re^8: trying to implement file tail with regular expression

Replies are listed 'Best First'.
Re^9: trying to implement file tail with regular expression
by poj (Abbot) on Feb 17, 2016 at 08:14 UTC

    Do you mean it does not read new lines as they are added to the file ?

      when I am performing debug in Eclipse and I click on step over button to check each line of the code, once it reach while(my $line = $fh->read) and i click on step over it stop at this point and i cannot proceed in the script. so answering your question I dont thing its reading even the first line in the file

        See the tail option

        When first started, read and return n lines from the file. 
        If n is zero, start at the end of file. If n is negative, 
        return the whole file. Default is 0.
        my $fh = File::Tail->new( name => $Config->{'_'}{'DIAGFILE'}, interval => 1, # wait at start maxinterval => 10, # change to suit adjustafter => 10, # change to suit tail => -1, # all lines read at start up );
        poj