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

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

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

Replies are listed 'Best First'.
Re^10: trying to implement file tail with regular expression
by mkhayat (Initiate) on Feb 17, 2016 at 08:27 UTC

    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

        Its working finally. Thank you very much for your support I really appreciated :) :) :)