in reply to Error using Net::SFTP

You're going down the right road with Net::SFTP::Foreign. Make sure you have an sftp client loaded locally (I found Cywin's sftp client works fine). Then post some code and we can probably point you in the right direction.