Thanksmy @remote_files = $ftp->nlst(); my @get_files; print "The current date is $month $day $year\n" if $DEBUG eq 'yes' +; foreach $file (@remote_files) { chomp($file); if ($file =~ /O$year\_$month\_$day/ ) { push @get_files, $file; print "Remote file matches needed file date $file\n" if ($ +DEBUG eq 'yes'); } } my $new_file; foreach $new_file (@get_files) { &ftp_files($new_file, $ftp); chomp($new_file); print "zip_file $ccp_home/$new_file\n" if $DEBUG eq 'yes'; if ( -e "$ccp_home/$new_file" ) { print "unzipping $ccp_home/$new_file\n" if $DEBUG eq 'yes' +; system("/usr/bin/unzip -q $ccp_home/$new_file"); $month = &fix_date($month); $year -= 2000; $year = &fix_date($year); $day = &fix_date($day); } else { print "File for unzipping not found: $ccp_home/$new_file\n +" if $DEBUG eq 'yes'; }
In reply to 5.8.8 stat and file test fails by emwdrich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |