Hi folks,
I need a perl script or module which could ftp a file from A server to B server and from B to C server and the script should be running on A server. and there is no connection between A to C and for each server(A,B,C) user and password authentication is required. please help on it. i had writen a script on below plese look into it and help me on it.
on server A some.hostA.com the below script have been writen. and trying to execute on the A server.
#!/usr/bin/perl use Net::FTP; $ftp = Net::FTP->new("some.hostB.com", Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("xxx",'xxx') or die "Cannot login ", $ftp->message; #$ftp->cwd("/pub") # or die "Cannot change working directory ", $ftp->message; $ftp->put("cron/eid_inv_ftp.pl"); $newftp = Net::FTP->new("some.hostC.com", Debug => 0) or die "Cannot connect to some.host1.name: $@"; $newftp->login("xxxx",'xxx') or die "Cannot login ", $newftp->message; print $newftp->pwd(); $newftp->put($ftp->get("/export/home/xx/debugtrans.pl")) or die "put failed ", $newftp->message; $newftp->quit; $ftp->quit;
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |