in reply to Re: Net::FTP
in thread Net::FTP's get() does not handle wildcards
It could probably be written a lot simpler than that, but I like to keep things in a format I can easily understand.if (@dirlist = ($ftp->ls)) { foreach $_ (@dirlist) { if (s/(\w+shar\d\d\d\d\d\d\.\d\d\d\d)/$1/) { $file = $1 if ($ftp->get($file)) { } else { print "$host: Got directory listing, but couldn't get file.\n" +; } } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Net::FTP
by nimdokk (Vicar) on Oct 03, 2003 at 10:05 UTC |