in reply to How to monitor a child process from a perl script

If you only have one file to monitor and nothing else to do while you wait for it to be updated, you might find File::Tail helpful.

update: Or, you could do something like the following:

use strict; use warnings; open(my $fh, '<', 'test.dat') or die "test.dat: $!"; while(1) { my $line = <$fh>; if(defined($line)) { print "$line"; } else { sleep(10); } } close($fh);