I've tried my $bla = $ssh->send("ping 172.16.10.29\n") but it doesn't work. Any idea? thanks.$ssh->expect(10, [ qr 'wall#', sub { $ssh->send("ping 172.16.10.29\n"); # h +ow do I get the output of this ping into a variable? }], );
In reply to storing return value from Expect by perlknight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |