in reply to Re: Net::SCP::Expect Error Handling
in thread Net::SCP::Expect Error Handling
Thanks. Can you please explain the code. especially stdin functionality.
In the mean time , i have used the eval function to catch the error
#!/usr/bin/perl use Net::SCP::Expect; my $user = 'user1'; my $pass = 'pass1'; my $host = 'host1'; my $src_path = "/home/sid.txt"; my $dst_path = "/home/datprd/"; my $s = Net::SCP::Expect->new; $s->login($user, $pass); eval{ $s->scp("$host:$src_path",$dst_path);}; print $@;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Net::SCP::Expect Error Handling
by salva (Canon) on Jan 29, 2016 at 08:51 UTC | |
by siddhanta (Initiate) on Jan 29, 2016 at 11:20 UTC | |
by salva (Canon) on Jan 29, 2016 at 12:38 UTC | |
by siddhanta (Initiate) on Jan 29, 2016 at 11:03 UTC | |
by salva (Canon) on Jan 29, 2016 at 11:11 UTC |