Using the following code, I can download the required file to a wide open cgi-bin but how do I save the file to a directory outside the cgi-bin?
Keith
Code:
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use Time::Local;
use warnings;
use strict;
use Net::FTP;
print "Content-type: text/html\n\n"; # prepare for HTML output
my $host = "ftp.website.co.uk";
my $user = "user";
my $password = "pass";
my $f = Net::FTP->new($host) or die "Can't open $host\n";
$f->login($user, $password) or die "Can't log $user in\n";
my $file = "my file name";
$f->get($file) or die "Can't get $file\n";
print "End";
Keith