title: Net::FTP unable to connect to some hosts
body: <p>I'm not sure what can be wrong here since out of 10 servers, 2 are giving me the error:</p>
  
  <blockquote>
    <p>Cannot connect to sun09 : Net::FTP: Bad hostname 'sun09:' at deploy_update.pl line 204.</p>
  </blockquote>
  
  <p>The weird thing is, the following code extract works inside a loop, and works for some servers, but for the <code>sun09</code> server I'm unable to connect.</p>
  
  <pre><code>$ftp = Net::FTP-&gt;new("$hostname:$ftp_port",  Debug =&gt; 0)
  or die "Cannot connect to $hostname : $@";
  $ftp-&gt;login($iLogin,$iPass)
  or die "failed ", $ftp-&gt;message;
  $ftp-&gt;binary()
  or die "Cannot set to Binary";
  $ftp-&gt;delete("/admin/replicate/inbound/$file");
  #or warn $ftp-&gt;message;
  $ftp-&gt;cwd("/admin/replicate/inbound")
  or die "Cannot change working directory ", $ftp-&gt;message;
  $ftp-&gt;put("$file")
  or die "Upload Failed ", $ftp-&gt;message;
  $ftp-&gt;quit;
  </code></pre>
  
  <p>This works for 8 of 10 servers but not for <code>sun08</code> and <code>sun09</code>.</p>