in reply to Parsing a text log file as it is being created
open (FILE,"newfile") or die "Can't read file: $!"; my $continue = 1; while ($continue) { while (<FILE>) { # do something with $_ if (/some_end_condition/) { $continue = 0; last; } } # when we get here, we're at the EOF seek (FILE, 0, 1); # reset the EOF flag sleep 1; # wait a bit }
-- Dan
|
|---|