sub anoc2server { ### Start the SCP my ($user, $passwd, $dstserver, $srcpathfile, $dstpathfile) = @_; my $scp = Net::SCP::Expect->new(host=>$dstserver, user=>$user, password=>$passwd); {$scp->scp($srcpathfile,$dstpathfile);}} }