DV has asked for the wisdom of the Perl Monks concerning the following question:
The following script does not copy the *.log files properly. it copies but adds all the files to log file. #!/usr/bin/perl use Net::FTP; #use strict; my @transferFileList = glob "*.log"; foreach my $transferFile(@transferFileList) { $ftp = Net::FTP->new("62.185.44.98", Debug => 0) or die "Cannot connect to 62.185.44.98: $@"; $ftp->login("f1rewall",'car1bbean') or die "Cannot login ", $ftp->message; $ftp->binary(); $remote = "clm"; print $ftp->pwd (); print "\n"; $ftp->cwd($remote) or die "Cannot change working directory ", $ftp->me +ssage; print $ftp->pwd (); print "\n"; $ftp->put($transferFile); $ftp->quit; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: FTP multiple files
by Samy_rio (Vicar) on Apr 25, 2007 at 11:00 UTC | |
Re: FTP multiple files
by johngg (Canon) on Apr 25, 2007 at 10:33 UTC |