in reply to SFTP using Net::SFTP

Did you read the Net::SFTP documentation? The answers to your question are there. If you Super Search this site you will find many examples for using Net::SFTP.

Martin