tariqahsan has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to use the Net::FTP module to get a remote file
where file names (could be multiple files) is only partially known.
I am trying the following which is not working
$host = 'myhost'; $user = 'myuser'; $password = 'mypassword'; $dir = "mydir/mysubdir/"; $file = "myfile"; $ftp = Net::FTP->new($host) or die $!; $ftp->login($user,$password) or die $!; $ftp->cwd("$dir") or die "FTP cwd failed : $!\n"; $ftp->put("$myfile*") or die "FTP put failed : $!\n"; $ftp->quit() or die "FTP quit failed : $!\n";
What would be the best way to do this?
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: using Net::FTP to get a file without a full name
by buckaduck (Chaplain) on Aug 23, 2004 at 22:32 UTC | |
Re: using Net::FTP to get a file without a full name
by Aristotle (Chancellor) on Aug 23, 2004 at 22:32 UTC | |
by tariqahsan (Beadle) on Aug 24, 2004 at 15:26 UTC | |
by iburrell (Chaplain) on Aug 24, 2004 at 16:59 UTC |