Smaug has asked for the wisdom of the Perl Monks concerning the following question:
use strict; my $mytime=(time); my ($File,$FileStat,$CallOutDir); opendir(CallOut, $CallOutDir) || die "$!\n"; foreach $File (readdir(CallOut)) { next if $File=~/^\./; if ($FileStat = (stat $File)[9]){ if ($FileStat <= ($mytime - 1200)) { print "File older than 20min found. The file name is $File"); #send mail here.... last; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File stat problem
by Abigail-II (Bishop) on Feb 26, 2004 at 13:48 UTC | |
by Smaug (Pilgrim) on Feb 26, 2004 at 13:57 UTC | |
|
Re: File stat problem
by ambrus (Abbot) on Feb 26, 2004 at 15:02 UTC | |
|
Re: File stat problem
by maa (Pilgrim) on Feb 26, 2004 at 13:41 UTC | |
by Smaug (Pilgrim) on Feb 26, 2004 at 13:45 UTC | |
|
Re: File stat problem
by derby (Abbot) on Feb 26, 2004 at 13:43 UTC | |
by Smaug (Pilgrim) on Feb 26, 2004 at 13:52 UTC | |
|
Re: File stat problem
by TomDLux (Vicar) on Feb 26, 2004 at 17:42 UTC | |
by ambrus (Abbot) on Feb 27, 2004 at 20:38 UTC |