in reply to Net::FTP's get() does not handle wildcards

I like princepawn's answer.

But just in case downloading a different module isn't an option, why not do what mget does yourself? All you need to do is grep through the results of ls to select the files to download.

use POSIX qw(strftime); use Net::FTP; foreach my $host(@hosts) { $ftp = Net::FTP->new($host); # you probably want to use a different login $ftp->login("anonymous",'nairod@wherever.net'); # just in case... $ftp->binary(); $ftp->cwd("/whatever/place/shars/are"); my @files=grep /${host}shar\d{6}\.\d{4}/,$ftp->ls(); foreach(@files) { $ftp->get($_); } $ftp->quit(); }
I think that might do what you want, but it's untested.
--
Mike