perlvroom has asked for the wisdom of the Perl Monks concerning the following question:
So the above will check an FTP site for 3 separate filemasks. I'd like to improve it to where if any one of the files is missing it prints the missing file.my @files = ('abc*.txt','efg*.txt','xyz*.txt'); my @a = $ftp->ls($files[0]); my @b = $ftp->ls($files[1]); my @c = $ftp->ls($files[2]); if (@a && @b && @c){ print "file is not missing"; } else{ print "File X is missing"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Script to check for multiple files on FTP and print the one missing
by zork42 (Monk) on Jul 01, 2013 at 03:19 UTC | |
by LanX (Saint) on Jul 01, 2013 at 03:27 UTC | |
by zork42 (Monk) on Jul 01, 2013 at 03:55 UTC | |
by perlvroom (Acolyte) on Jul 01, 2013 at 04:33 UTC | |
by zork42 (Monk) on Jul 01, 2013 at 05:07 UTC | |
by Anonymous Monk on Jul 01, 2013 at 03:29 UTC | |
by zork42 (Monk) on Jul 01, 2013 at 04:01 UTC | |
|
Re: Script to check for multiple files on FTP and print the one missing
by Anonymous Monk on Jul 01, 2013 at 02:55 UTC |