Hi there,
I need to use Net::SCP::Expect to transfer file from one server to another. I am using ActivePerl for my development.
Here is my test code
use strict;
use warnings;
use Net::SCP::Expect;
my $scpe = Net::SCP::Expect->new(host=>$host, user=>$user, password=>$pass, option=>'StrickHostKeyChecking=no',port =>22) || die "ERROR: Uable to login\n";
$scpe->scp('test.txt', '/home/ywang');
print "Done\n";
It gives the following error
Can't locate object method "new" via package "Expect" (perhaps you forgot to load "Expect"?)
There is a thread for the same problem I have, but I could not find the solution from it. Could anyone provide me some advice? Thank you very much!
I need to use Net::SCP::Expect to transfer file from one server to another. I am using ActivePerl for my development.
Here is my test code
use strict;
use warnings;
use Net::SCP::Expect;
my $scpe = Net::SCP::Expect->new(host=>$host, user=>$user, password=>$pass, option=>'StrickHostKeyChecking=no',port =>22) || die "ERROR: Uable to login\n";
$scpe->scp('test.txt', '/home/ywang');
print "Done\n";
It gives the following error
Can't locate object method "new" via package "Expect" (perhaps you forgot to load "Expect"?)
There is a thread for the same problem I have, but I could not find the solution from it. Could anyone provide me some advice? Thank you very much!