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
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