emwdrich has asked for the wisdom of the Perl Monks concerning the following question:
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'; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 5.8.8 stat and file test fails
by kyle (Abbot) on Aug 18, 2008 at 20:57 UTC | |
by emwdrich (Initiate) on Aug 18, 2008 at 21:14 UTC | |
by Anonymous Monk on Aug 19, 2008 at 08:38 UTC | |
by emwdrich (Initiate) on Aug 19, 2008 at 14:54 UTC | |
by kyle (Abbot) on Aug 19, 2008 at 15:09 UTC | |
|