Hi,

I am writing a small script that uses Net::FTP module to get/put a file
to/from a FTP server running on NT.
Everything works fine, but when I try to get the file perl gives the
following error message:

>>> Can't use string ("1") as a symbol ref while "strict refs" in use at
C:/Perl/site/lib/Net/FTP.pm line 474. <<<

Even the file is created localy with the length 0!
I am using Perl 5.6.1 on NT 4.0 sp6a.

Here is the script:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
use Net::FTP;
#################
# FTP DownLoad  #
#################

sub MyFTPDownLoad
{
     my ($ip,$userid,$password,$dir,$filename) = @_;
     $ftp = Net::FTP->new($ip, Debug => 1, Hash => 1);
     $ftp->login($userid,$password);
     $ftp->cwd($dir);
     $ftp->binary();
     $ftp->get($filename,$filename);
     $ftp->quit;
     undef $ftp;
}

MyFTPDownLoad('secret','secret','**********','/Dir1/Dir2','filename.zip');
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

What is the problem here? Can any body help me???
Regards,

Peter

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to