in reply to Re: Re: RE: Automatic FTP Script?
in thread Automatic FTP Script?

I'm wondering if anyone has been able to find/create an mget function for Net::FTP. Thanks.

Replies are listed 'Best First'.
Re: Re: Re: Re: RE: Automatic FTP Script?
by Juerd (Abbot) on Jan 19, 2002 at 23:05 UTC
    use Net::FTP::Common;
    ... # Get all .png files (and .PNG, .Png, etc) for ($object->grep(Grep => qr/\.png$/i)) { $object->get(File => $_); }
    Note: this uses a regex, not a glob! And this snippet would also download files with names ending in ".png\n".

    2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$