in reply to Net::FTP creates empty file
I gave you the wrong advice with "Unsuccessful transfer: $@\n" go back to Re: NET::FTP Problem and also read Beginners guide to Net::FTP. Also, just for grins, can you do this ftp manually?
-derby
ps please use code tags, it's hard to read your question without them.
#!/D:/perl/bin/-w # a module making life easier use strict; use Net::FTP; my $destserv="ftp.somewhere.com"; my $user="user"; my $password="password"; my $dir = "/my/directory"; my $file_to_put = "ftptest2.txt"; my $ftp = Net::FTP->new($destserv) or die "Can't Open $destserv\n"; $ftp->login($user,$password); $ftp->cwd($dir) or die "Can't cwd to $dir\n"; $ftp->ascii(); $ftp->pasv(); $ftp->put($file_to_put) or die "Unsuccessful transfer:$@\n"; $ftp->quit();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: FTP
by doesntmatter (Initiate) on Aug 21, 2002 at 17:23 UTC | |
by derby (Abbot) on Aug 21, 2002 at 17:33 UTC |