my $syncfile = 'sync.fred'; my $start = (stat $syncfile)[9]; while ($start == (stat $syncfile)[9]) { sleep 1; } print "Now we can read the pipe\n";