hi marto,

Thanks for your reply,

here is my code.

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", D +ebug => 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 +;

In reply to Re^2: ftping a file from a remote server to another remote server by shivamem
in thread ftping a file from a remote server to another remote server by shivamem

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.