title: FTP file upload using perl from local system
body: <p><strong>Requirement:</strong></p>
  
  <p>I want to create a script that will upload files from local system to FTP server in using perl. </p>
  
  <p><strong>Sample Code:</strong></p>
  
  <pre><code>use Net::FTP;
      $ftp = Net::FTP-&gt;new("some.host.name", Debug =&gt; 0)
        or die "Cannot connect to some.host.name: $@";
      $ftp-&gt;login("anonymous",'-anonymous@')
        or die "Cannot login ", $ftp-&gt;message;
      $ftp-&gt;cwd("/pub")
        or die "Cannot change working directory ", $ftp-&gt;message;
      $ftp-&gt;get("that.file")
        or die "get failed ", $ftp-&gt;message;
      $ftp-&gt;quit;
  </code></pre>
  
  <p>P.S: Newbie in Perl. </p>