Net::FTP problem
- From: soup_or_power@xxxxxxxxx
- Date: 15 Apr 2005 11:02:40 -0700
The following code is generating the error: can't connect (in the code
below) I'm guessing the FTP is sending the username and hostname
separated by @ instead of sending just the host name followed by user
name and password and commands. It worked fine for some time but now
quit on me. Thanks for any of your help.
sub get_ftp_handle {
my($self, $ftp_host, $ftp_user, $ftp_pwd)=@_;
my $ftp_site = $ftp_host || "storm";
my $ftp_pass = $ftp_pwd || "pqww2o4";
$ftp_user ||= "qauser";
my $ftp = Net::FTP->new($ftp_site) || do {
warn "$ftp_user\@$ftp_site: can't connect\n";
return -1;
};
$ftp->login($ftp_user, $ftp_pass) || warn "$ftp_user\@$ftp_site:
can't login\n";
$ftp->binary();
return $ftp || die("cannot open ftp connection");
}
.
- Follow-Ups:
- Re: Net::FTP problem
- From: axel
- Re: Net::FTP problem
- From: Christian Winter
- Re: Net::FTP problem
- Prev by Date: Re: trouble with very simple regexp
- Next by Date: Finding CPU stats on Win?
- Previous by thread: memory leak in loop
- Next by thread: Re: Net::FTP problem
- Index(es):
Relevant Pages
|