Use Net::SSH2 . It does sftp as an internal method. See A little demo for Net::SSH2
In reply to Re: SFTP login problems by zentara in thread SFTP login problems by chipchidster