chimni has asked for the wisdom of the Perl Monks concerning the following question:
my @current = `date`; ($dnr,$month,$date,$tnr,$rr,$year)= split(/\s+/,$current[0]); chomp $year;chomp $date;chomp $month; $date-=1; my %month_conv=("Jan"=>"01","Feb"=>"02","Mar"=>"03","Apr"=>"04","May"= +>"05","Jun"=>"06","Jul"=>"07","Aug" =>"08","Sep"=>"09","Oct"=>"10","Nov"=>"11","Dec"=>"12",); $pingmonth=$month_conv{$month}; $filename="$year$pingmonth$date.dat"; print "getting $filename\n"; $dir='/log_recv/telecom/DATA'; use Net::FTP; $ftp = Net::FTP->new("aaa.com")|| die("Could not connect: $@\n +"); $ftp->login("xxx","yyy")||die("Wrong username or password "); $ftp->binary(); $ftp->cwd("$dir")||die("Could not change path "); #@aa=$ftp->ls("$dir"); $ftp->get("$filename")|| die("File not found $filename\n"); $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FTP and get file date manipulation problem
by Enlil (Parson) on May 30, 2003 at 05:13 UTC | |
|
Re: FTP and get file date manipulation problem
by jkenneth (Pilgrim) on May 30, 2003 at 15:48 UTC |