> -----Original Message-----
> From: Sparkle Williams [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, July 26, 2001 10:13 AM
> To: [EMAIL PROTECTED]
> Subject: Login error w/FTP
> 
> 
> Well, I have this script that I'm trying to write using the 
> FTP module, 
> however it keeps responding with an error message concerning 
> the login line 
> of the script whenever I try to run it. I have run out of 
> ideas and have 
> absolutely no clue as to what the problem is. It is driving 
> me crazy. Below 
> is an excerpt of the script. Help!
> use Net::FTP;
> 
>         print "Username?";
> 
>         $username = <STDIN>;
> 
>         print "Password?";
> 
>         $password = <STDIN> ;
> 
>         print "ftp_home?";
> 
>         $ftp_home = <STDIN>;
> 
>         print "The filename you are searching for is...";
> 
>         $filename = <STDIN>;
> 
>         $ftp = Net::FTP->new($url, Debug=>0);
> 
>         $ftp->login( $username , $password );
> 
>         print $ftp->cwd($ftp_home), "\n";
> 
>         $ftp->get($filename);
> 
>         $ftp->quit;

Looks like you need to chomp() the $username and $password variables. You
didn't give us the error message or tell where it was coming from, so this
is just a guess. Does it work if you hard code the username and password?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to