in reply to storing return value from Expect
Note that the second expect line is only required if echo is on. Even if it is, you can miss out the line if you don't mind grabbing the ping command as part of $bla.$ssh->expect(10, '-re', 'wall#'); $ssh->send("ping 172.16.10.29\n"); $ssh->expect(10,"\n"); $ssh->expect(1); $bla = $ssh->before();
Hope this is helpful,
Yoda
|
|---|