in reply to Test files not being processed
If not, you can use this:
This will go through files in a directory ($path), find the oldest file, check if it was modified (created or overwritten) within last 300 seconds... the rest insert accordingly.use strict; use warnings; use File::Glob; my $path = ""; my ($oldest, $fname) = (time, ''); my $modtime; chdir $path; foreach (glob("*")) { if (-f) { $modtime = (stat($_))[10]; ($oldest = $modtime and $fname = $_) if ($oldest > $modtime); } } print "$fname\t$oldest\n"; (abs(time() - $oldest) < 300) ? print "File recent enough\n" : print "Reporting an error\n";
--------------------------------
An idea is not responsible for the people who believe in it...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test files not being processed
by BadHabit (Initiate) on Jul 20, 2005 at 16:28 UTC | |
|
Re^2: Test files not being processed
by Anonymous Monk on Sep 28, 2005 at 17:37 UTC |