#!/usr/bin/perl use strict; use warnings; use Net::SFTP; ##All the credentials have been changed for privacy reasons my %args = (user=>'aaa', password=>'bbb'); my $ftp = new Net::SFTP('http://www.test.com',%args); ($get_code) = $ftp->get('temp1', 'temp2');