The above nods at the issue of race conditions; it ignores possible contention issues.my $old_time = (stat( $file ))[9]; while ( 1 ) { sleep $period_in_seconds; my $current_time = (stat($file))[9]; while ( $current_time != $old_time ) { $old_time = $current_time; print "file changed$/"; $current_time = (stat($file))[9]; } }
Be well,
rir
In reply to Re: Getting the timestamp of a file
by rir
in thread Getting the timestamp of a file
by becca23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |