Skip navigation.
Your source for Perl tips, howto's, faq and tutorials
( categories: )


I have a partial completed script:

use File::ReadBackwards;
$fh = File::ReadBackwards->new('file.txt') or
die "can't read file: $!\n";
while ( defined($line = $fh->readline) )
  print $line ;

# I want to get the last line containing the string "NFE" or whatever string i specify
# BUT there can be 2 or more lines containing the text NFE, also since this script runs as a deamon
# if it always gets the last line containing the text NFE, that line might be the one that WAS emailed
# during the LAST run, and nothing changed, so the DATE String HAS to be
# Compared, to see if this is INDEED a NEW line

# mail the LINE



Any help will be appreciated ,