469,285 Members | 2,554 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,285 developers. It's quick & easy.

Copy file from one machine to another machine using perl

HI ,

I want to copy a file from one machine to another machine using perl.
Also i want to know whether i can past arguments to perl program?
Sep 21 '07 #1
4 8642
prn
254 Expert 100+
Hi Npreeti,

Basically you copy a file from one machine to another with perl the same ways you would without perl. Perl can be used to automate the process, but doesn't replace any of them. And using perl doesn't change (certainly doesn't reduce!) the needs for security in doing so.

I'd recommend checking the perl modules Net::SCP and Net::SFTP for doing that. Both are built around secure protocols for during the transfer, but be careful to note that you still have to set up a secure means of protecting your passwords or other access credentials (e.g., RSA keys). I wish there were a good, simple, general means of doing that, but everyone's situation is different, so there's just no one-size-fits-all solution.

HTH,
Paul
Sep 21 '07 #2
prn
254 Expert 100+
Oh, regarding how to "past" arguments, I am guessing that you mean "post"? As in how do you read command line arguments in a perl program. Look up @ARGV. Google is your friend here as elsewhere.

Best Regards,
Paul
Sep 21 '07 #3
Oh, regarding how to "past" arguments, I am guessing that you mean "post"? As in how do you read command line arguments in a perl program. Look up @ARGV. Google is your friend here as elsewhere.

Best Regards,
Paul
Hi Paul,

Thank you for your reply.

As I am very new to perl as well as socket programming.I have one more doubt ,
In socket programming,i am conneting two machines,after establishing connection i have to send a file to remote machine (server),in server i have to check whether the file is received or not?

I am using TCP protocol for this,also for sending a file name send command i am using.also at server script recv command i have used.I dont know whether this is correct or not?

I will be very thankful to you if u help me out of this problem.

Regards,
Preeti
Sep 24 '07 #4
numberwhun
3,503 Expert Mod 2GB
Hi Paul,

Thank you for your reply.

As I am very new to perl as well as socket programming.I have one more doubt ,
In socket programming,i am conneting two machines,after establishing connection i have to send a file to remote machine (server),in server i have to check whether the file is received or not?

I am using TCP protocol for this,also for sending a file name send command i am using.also at server script recv command i have used.I dont know whether this is correct or not?

I will be very thankful to you if u help me out of this problem.

Regards,
Preeti
I have corrected the formatting of your post. Please do not top post. Always put your reply below the post you are replying to. Otherwise,

?
about
talking
are
you
what
know
anyone
will
how


Regards,

Jeff
Sep 24 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Tony George | last post: by
2 posts views Thread by Paul | last post: by
1 post views Thread by PRM | last post: by
reply views Thread by PRM | last post: by
2 posts views Thread by Shailesh Gajare | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.