Toby Corkindale toby.corkindale at strategicdata.com.au
Mon Mar 16 17:03:56 PDT 2015

I was just looking at the FTP spec, and I wonder if your code has been doing the wrong thing the whole time.
>From what I can tell from RFC 959, NLST isn't supposed to take wildcards as parameters at all - it's meant to be a fully-qualified path.

This doesn't excuse Net::FTP from crashing out when you do it, but all the same -- even if it used to work on one given FTP server and FTp client, there's no guarantee it'll work on other combinations of the two, since it appears to be an out-of-spec behaviour.

Maybe you'll find it easier to fix your Perl code to use legal FTP operations, and also avoiding the bad path in the code.

ie. Just use "NLST" without a parameter, get back a list of ALL files in the current directory, and then grep through them on the client side to see if the ones you want are present.


----- Original Message -----
> From: "Timothy Hunt" <T.Hunt at bom.gov.au>
> Hi Mongers. Being a public servant I have to use 'out of the box' versions of
> Perl. One of our data collection services is transitioning from RHEL5 to
> RHEL6. It uses FTP...
> Net::FTP=GLOB(0xb4d5460)>>> NLST T*
> Net::FTP=GLOB(0xb4d5460)<<< 550 Bad directory components
> Bad directory components
> So there are no "T*" files, fail with 550, move on…

More information about the Melbourne-pm mailing list