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; }
In reply to Re: Re: Perl process to constantly detect the time change of a file?
by graff
in thread Perl process to constantly detect the time change of a file?
by blackcode6
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |