title: perl NET::FTP ls is giving argument too long error
body: <p>I am a totally newbie to Linux and perl. there is a perl script on one of our linux box which downloads daily generated log files from another linux machine. this script was stopped two months ago and now when I am trying to run it again, it is giving <strong>"Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 550 Arguments too long"</strong> error, I looked up for files onto the source machine and found that there are around 36000~ log files have been created so far.</p>
  
  <p>For test purpose 
  1.) I used linux ftp command to connect to source machine and list the files using ls which was successful.
  2.) I also logged into the source machine and ran ls command into the log files directory and it was successfully listing the files.</p>
  
  <p>can anyone please advise why this the case with perl script which is getting 550 error code from server for listing those files?</p>
  
  <p>Below is the debug log Trace of perl script which we are using to download files :- </p>
  
  <pre><code>Net::FTP&gt;&gt;&gt; Net::FTP(2.77)
  Net::FTP&gt;&gt;&gt;   Exporter(5.58)
  Net::FTP&gt;&gt;&gt;   Net::Cmd(2.28)
  Net::FTP&gt;&gt;&gt;   IO::Socket::INET(1.31)
  Net::FTP&gt;&gt;&gt;     IO::Socket(1.30)
  Net::FTP&gt;&gt;&gt;       IO::Handle(1.27)
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 220 hostname.server FTP server (Version wu-2.6.2-5-ncx-1 Wed Jun 29 14:53:11 CEST 2005) ready.
      Net::FTP=GLOB(0x87423fc)&gt;&gt;&gt; USER USR
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 331 Password required for USR.
      Net::FTP=GLOB(0x87423fc)&gt;&gt;&gt; PASS ....
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 230 User USR logged in.  Access restrictions apply.
      Net::FTP=GLOB(0x87423fc)&gt;&gt;&gt; CWD /backup
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 250 CWD command successful.
      Net::FTP=GLOB(0x87423fc)&gt;&gt;&gt; PORT 192,168,1,154,217,0
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 200 PORT command successful.
      Net::FTP=GLOB(0x87423fc)&gt;&gt;&gt; NLST
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 550 Arguments too long
      Net::FTP=GLOB(0x87423fc)&gt;&gt;&gt; QUIT
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 221-You have transferred 0 bytes in 0 files.
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 221-Total traffic for this session was 393 bytes in 0 transfers.
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 221-Thank you for using the FTP service on hostname.server
      Net::FTP=GLOB(0x87423fc)&lt;&lt;&lt; 221 Goodbye.
  </code></pre>
  
  <p>Thanks in Advance</p>