in reply to Re: How to retrieve files from ftp server
in thread How to retrieve files from ftp server
sorry for not being so specific and I really want to learn perl, but am a novice. Here is the code snippet I've written. I've declared wk as 02,but this changes every week and am not sure how to get that info. Also there may be other weeks files lying around in ftp server.
sub getfilelist { my $ftp = shift; my @fileist = $ftp->dir or die "Unable to retrieve file listing"; my $WK = '02'; for my $file ( @filelist ) { next unless $file =~ m/ ^AB$WKCD.txt$/ or $file =~ m/ ^BC$WKDE +.txt$/; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to retrieve files from ftp server
by Corion (Patriarch) on Nov 20, 2015 at 12:24 UTC | |
by Rajiram (Initiate) on Nov 20, 2015 at 13:37 UTC | |
|
Re^3: How to retrieve files from ftp server
by hippo (Archbishop) on Nov 20, 2015 at 12:22 UTC |