I am reading continuously a file like this:

  open LOG, "junk.txt" or die "Cannot open $file, $!\n";
  while ( my $line = <LOG> ) {
    print "$line";
  }

While appending lines to the file from a shell command line:

  $ echo "this is a new line" >> junk.txt

Everything ok, except that I would like to find out from the Perl code
above when junk.txt has been deleted, or renamed. Unfortunately, "tail
-f" does not exit...

Any idea how to do that?
-- 
        Claude

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to