Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, i have this simple script to check if a file has arrive since the last hour
find2perl tmp -type f -eval '-M $_ < 1/24' -print |perlbut now i would like to check in a remote server, maybe on ftp session. i have this ftp.pl
perl -w >> ftp.log -MNet::FTP -le' ( $host, $user, $pass, $dir ) = @ARGV; $ftp = Net::FTP->new($host) or die "$@\n"; $ftp->login( $user, $pass ) or die $ftp->message; $ftp->cwd($dir) or die $ftp->message; $ftp->binary; for $file ($ftp->ls){ push @files, $file; } for $file (@files) { } $ftp->quit or die $ftp->message; ' server user pass dir
but don't know how to include the eval. I also would like to send mail if there is not new file in the past hour Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Newbie: how evaluate files newer than an hour within ftp
by Khen1950fx (Canon) on Aug 12, 2010 at 06:03 UTC | |
by Anonymous Monk on Aug 13, 2010 at 14:45 UTC | |
|
Re: Newbie: how evaluate files newer than an hour within ftp
by lostjimmy (Chaplain) on Aug 11, 2010 at 20:34 UTC |