in reply to Getting the timestamp of a file

If you just want to process the file periodically when it has changed, you can:
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]; } }
The above nods at the issue of race conditions; it ignores possible contention issues.

Be well,
rir