1. The same script, no changing any code, yes, no changing any bit,
sometimes it work correctly, sometimes not.

I mean, even the files count more than one thousand, it can work
correctly once, but the tightly append, run for the twice, it will
crash down.


---------- Forwarded message ----------
From: peng wei <cnpeng...@gmail.com>
Date: 2010/11/8
Subject: Fwd: I am facing one real question, maybe one potential issue
of perl ftp component?
To: dev@perl.apache.org


This issue occurred so many times, lead to my thinking that maybe this
is one issue.

The reason is:

1. The same script, no changing any code, yes, no changing any bit,
sometimes it work correctly, sometimes not.

2. When the files was fetched was little amount, such as some dozens,
it will always be correct.

3. When the files count more than some hundreds, it will crush.



---------- Forwarded message ----------
From: peng wei <cnpeng...@gmail.com>
Date: 2010/11/8
Subject: I am facing one real question
To: dev@perl.apache.org


Hi All,

I don't think this is in the range of FAQ, so I write this mail to ask for help.

Thanks all in advance.


Situation description:

1. There is one ftp server, there is one folder called map_files on it.

2. The objective of my perl script is fetch the files down from this
ftp server, which all located int the map_files folder.

3. Below warning was encounted:
Can't use an undefined value as a symbol reference at
C:/Perl/lib/Net/FTP/dataconn.pm line 54.

4. I have searched all google, can not find any useful infomation.

my scrip like below:

sub getmap_FTP1()
{
   $hostname2 = "ftp.abc.com.tw";
   $username2 = "abc";
   $password2 = "abc";
   $remopath2 = "/abc/def";

   $ftp = Net::FTP->new($hostname2, Debug => 0, Port => 21,Timeout => 1240);
   chdir($LocalPath);
   if($ftp->login($username2, $password2))
   {
               if ($ftp->cwd($remopath2))
               {
                       print "change remote work directory succeed \n";
                       $ftp->binary;
                       foreach $lot_file(@map_files)
                       {
                        �...@files = $ftp->ls($lot_file."*");
                         if (scalar(@files)>0)
                         {
                                 foreach $each_file(@files)
                                 {
                                         print "fetching-->";
                                         $ftp->get($each_file);
                                         print $each_file."\n";
                               }
                           }
                       }
                 }
     }
 $ftp->close;
}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@perl.apache.org
For additional commands, e-mail: dev-h...@perl.apache.org

Reply via email to