in reply to Re: Perl process to constantly detect the time change of a file?
in thread Perl process to constantly detect the time change of a file?

Right -- of course one would usually want to make sure it goes like this (Rich36 assumes this goes without saying):
while(1) { my $modtime = (stat($file))[9]; if ($modtime == $lastaccessed) { # The file is the same } else { # File is different; do whatever, and also: $lastaccessed = $modtime; } sleep 5; }
  • Comment on Re: Re: Perl process to constantly detect the time change of a file?
  • Download Code