#!/usr/bin/perl use strict; use warnings; use Net::SFTP::Foreign; my $sftp = Net::SFTP::Foreign->new( 'user@localhost', password => 'password', more => ['-v'] ); $sftp->get('/remote/Desktop/copy', '/home/user/Desktop/copy') or die "unable to retrieve copy: ".$sftp->error;