in reply to copying file from one server to other

Hello vickey110,

Welcome to the Monastery. Although the fellow Monks have address your question already I just wanted to add something minor.

Just for the record similar questions that have been asked at the Monastery (scp perl, Using SSH and SCP in a perl script with taint flag, etc...).

To be honest for your task I would prefer to use Net::SFTP::Foreign, why? You can find more information here Net::SFTP::Foreign Vs. Net::SFTP Vs. Net::SSH2::SFTP.

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!