Net::FTPSSL error

Dan Nelson dnelson at allantgroup.com
Sun Apr 9 04:37:31 UTC 2006


In the last episode (Apr 08), Ashok Shrestha said:
> Adding freebsd-hackers at freebsd.org
> 
> On 4/8/06, Ashok Shrestha <ashok.shrestha at gmail.com> wrote:
> > I'm trying to use Net::FTPSSL to connect to an FTP server via SSL.
> > Here is the script:
> >
> > #!/usr/bin/perl -w
> >
> >   use Net::FTPSSL;
> >
> >   my $ftps = Net::FTPSSL->new('127.0.0.1',
> >                               'Encryption' => 'E',
> >                               'Debug' => 1,
> >                               'Timeout' => 20)
> >     or die "Can't open 127.0.0.1";
> >
> >   $ftps->login('username123', 'password123') or die "Can't login: ",
> > $ftps->$last_message();
> >
> >   $ftps->cwd("/working") or die "Can't change directory: ", $ftps->last_message;
> >
> >   $ftps->get("C13.txt") or die "Can't get file: ", $ftps->last_message;
> >
> >   $ftps->quit();
> >
> > Here is my error:
> > ./test_FTPSSL.pl
> > Name "main::last_message" used only once: possible typo at
> > ./test_FTPSSL.pl line 11.
> > >>> USER username123
> > <<< 331 Please specify the password.
> > >>> PASS password123
> > Use of uninitialized value in length at (eval 7) line 1.
> > Use of uninitialized value in string eq at blib/lib/Net/SSLeay.pm
> > (autosplit into blib/lib/auto/Net/S
> >
> > SLeay/ssl_read_all.al) line 1615.
> > Can't read on socket:  at ./test_FTPSSL.pl line 11

I don't know any perl, but why is your test script printing an error
message ("Can't read on socket") that's not in the source you pasted, and
does the warning "Name "main::last_message" used only once: possible typo at
./test_FTPSSL.pl line 11" have anything to do with it?

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-hackers mailing list