in reply to Not able to use Net::SFTP module.

Use Net::SFTP::Foreign instead!

In case you have already spent too much time writing scripts for Net::SFTP, the module also provides a compatibility layer: Net::SFTP::Foreign::Compat.