title: Why does NET::FTP upload files so slowly
body: <p>My problem is about using perl to ftp a local file to the ftp server. The question is why the upload speed is so slow. Here is code:</p>
  
  <pre><code>use strict;
  use warning;
  
  use NET::FTP;
  
  my $ftpserver = "10.110.143.9";
  my $usr       = "John";
  my $passwd    = "John";
  
  sub main {
      my $ftp = Net::FTP-&gt;new( $ftpserver, Timeout =&gt; 200 ) or print "Can't connect ftpserver" sleep 5;
      my $rc = $ftp-&gt;login( $usr, $passwd );
      unless ($rc) {
          print("login failed!");
          return 1;
      }
      print("login success");
      $ftp-&gt;binary();
      $ftp-&gt;put("d:\\2012.txt");
      $ftp-&gt;quit;
      return 0;
  }
  </code></pre>
  
  <p>Upload times for 30mb are about 5 minutes while using another ftp client on the same machine  takes only 10 seconds or so.</p>