Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, inside an ftp session i need to know if a file has arrive in the last hour, if not then send an email. the olders files on the remote server does'nt matter.
for $file ($ftp->ls){ push @files, $file; } for $file (@files) { $localtimenoformat=time; $mdtmnoformat=$ftp->mdtm($file); unless ( ($localtimenoformat - $mdtmnoformat) > 3600 ) { print "$file"; print "Localtime No Format = $localtimenoformat"; print "MDTM No Format = $mdtmnoformat\n"; } envia_mail (); } $ftp->quit or die $ftp->message;
this print me the new files. this is not what i want, beside this evaluate all the files. In short terms. if no file in the last hour send a mail. I'll appreciate if you point me to clear the idea
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Newbie: need algorithm to evaluate no file exist
by kennethk (Abbot) on Aug 18, 2010 at 15:07 UTC | |
by ikegami (Patriarch) on Aug 18, 2010 at 15:29 UTC | |
by Anonymous Monk on Aug 18, 2010 at 15:39 UTC | |
by locked_user sundialsvc4 (Abbot) on Aug 18, 2010 at 15:53 UTC | |
by Anonymous Monk on Aug 18, 2010 at 15:34 UTC | |
by kennethk (Abbot) on Aug 18, 2010 at 16:02 UTC | |
|
Re: Newbie: need algorithm to evaluate no file exist
by jethro (Monsignor) on Aug 18, 2010 at 15:17 UTC | |
|
Re: Newbie: need algorithm to evaluate no file exist
by murugu (Curate) on Aug 18, 2010 at 15:16 UTC |