$|=1; use Net::SFTP; use Net::SFTP::Recursive qw(:all); use Net::SSH::Perl; $host="somehost"; $user="user"; $password="pass"; $upfile_subdir="/tmp"; $rmt_dir="/home/swares/mgp/installfiles"; print "Setup connection to $host..."; use Net::SFTP::Recursive; my %cfg = ( user=>"$user", password=>"$password", local_dir=>"$upfile_subdir", remote_dir=>"$rmt_dir", file_pat=>'.htm$', debug=>1); my $sftp = Net::SFTP::Recursive->new("$host",%cfg); print " Done\n"; print "Get file..."; $sftp->rget("$rmt_dir","$upfile_subdir"); print " Done\n";