I have put the script on the server onto which I am downloading the files. Based on my undertanding of the Net:: FTP docs the new file should be created in and identical path/$filename as the original, but in fact the file is only showing up in the cgi-bin. Obviously it is my misunderstanding but I would appreciate some help in unravelling this. (Obviously having got the files onto the server I can easily shift them to where I need them and clean up afterwards, but I would prefer to get this working to my satisfaction!).
my $ftp = Net::FTP->new("$home") or die "Can't connect: 1 $@\n"; $ftp->login($username, $password) or die "Couldn't login - 1\n"; $ftp->cwd($directory) or die "Couldn't change direct +ory - 1\n"; $ftp->get($filename) or die "Couldn't get $filename + - 1\n"; $ftp->put($filename) or die "Couldn't put $filename +\n"; my @lines = $ftp->ls("/data/edit");
In reply to Re: Re: Net::ftp - copy of file in cgi-bin
by jonnyfolk
in thread Net::ftp - copy of file in cgi-bin
by jonnyfolk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |