in reply to some more help
in thread File::Tail on win32

This modified version may be closer to what you want:

use strict; use warnings; my $logFileName = 'test.txt'; my $highWater = -1; # Signal first time through while (1) { next if ! -e $logFileName; if ($highWater >= -s $logFileName) { $highWater = -s $logFileName; # Reset high water mark next; } open inFile, '<', $logFileName; seek inFile, $highWater, 0; #my @lines; # Uncomment to collate lines while (<inFile>) { print $_; # Replace with alternate code to handle output. #push @lines, $_; #Uncomment to collate lines } $highWater = tell inFile; close inFile; # Use @lines as required here to deal with added lines in one hit. e +g.: #print @lines; #Uncomment to print collated lines } continue { sleep (5); }

DWIM is Perl's answer to Gödel