using NET::FTP

  • Thread starter Virginia Walters
  • Start date
V

Virginia Walters

Hi all,

I am new to perl and I am trying to use the NET::FTP command to first
connect to a proxy server that must be given a userid and password and
then do another NET:FTP to a public database server. Here is my code
however I continue to get the following error message:

yntax error at /ds01/install/s92mw01/SeqStore/DataServeRDB/util/ftp_util.pl
lin
e 297, near ""Cannot create ftp connection to Proxy server $proxyhost
$@\n";"
Execution of /ds01/install/s92mw01/SeqStore/DataServeRDB/util/ftp_util.pl
aborte
d due to compilation errors.

Here is the code
$ftp1 = Net::FTP->new($proxyhost, (Passive=>0, Debug=>$DEBUG) or die
"Cannot c
reate ftp connection to Proxy server $proxyhost $@\n";
$ftp1->login($proxyuser, $proxypasswd) or die "Cannot login to proxy
server $@
\n";

$ftp = Net::FTP->new("$ftphost", @firewall, @NetFtpArgs) or
die "Cannot connect to $ftphost\n";
$ftp->login($login,$pwd) or die "Cannot login to $ftphost\n";
print LOGFILE "logged in to $ftphost\n";
$loginTime = time();
if ( $accType =~ /master/ ) {
$ftp->cwd(ds_autoupdate) or
die "Cannot find directory ds_autoupdate on server $ftphost\n";
} elsif ( $accType =~ /taxonomy/ ) {
$ftp->cwd(tax_update) or
die "Cannot find directory tax_update on server $ftphost\n";
} elsif ( defined $remoteDir ) {
$ftp->cwd($remoteDir) or
die "Cannot find remote directory $remoteDir on server
$ftphost\n";
}
$ftp->binary or die "Cannot set transfer type to binary\n";
print LOGFILE "Connection complete\n";
} # end sub Connect

thanks in advance for any help

Virginia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ls in ftp fails 5
A timeout question using Net::FTP 2
what happened with this error? 0
Net::FTP: cwd(' ') 5
loops in perl automated ftp 9
Net::FTP - Binary mode 5
Perl FTP Get Help 3
FTP problem 1

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top