Are you sure that the connection to $ip worked? How can you tell? (You don't have any code in this snippet that shows you are checking.)
BTW, you probably want to use Net::SFTP::Foreign or Net::SSH2 instead. See Net::SFTP::Foreign Vs. Net::SFTP Vs. Net::SSH2::SFTP.
In reply to Re: Couldn't get handle : Failure at line 11,sftp a file in perl
by Mr. Muskrat
in thread Couldn't get handle : Failure at line 11,sftp a file in perl
by amchidam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |