title: wget from a command line
body: <p>I can download a file from another server using wget command on a Linux command line, example:</p>
  
  <pre><code>wget ftp_site_name/file_name
  </code></pre>
  
  <p>But I could not download the same file when I run wget inside a perl script </p>
  
  <pre><code>system "/usr/bin/wget ftp_site_name/file_name";
  </code></pre>
  
  <p>or </p>
  
  <pre><code>system "wget ftp_site_name";
  </code></pre>
  
  <p>Here is the snippet of the error message:</p>
  
  <pre><code>Resolving ftp site  ...xx.xx.x.xx
  
  Connecting to ftp site|xx.xx.x.xx|:xx... connected.
  
  Logging in as anonymous ... Logged in!
  
  ==&gt; SYST ... done.    ==&gt; PWD ... done.
  
  ==&gt; TYPE I ... done.  ==&gt; CWD (1) /pub/??/??/ ...
  
  No such directory `pub/??/??/'.
  </code></pre>
  
  <p>Any suggestions?</p>