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