$ssh->expect(10, '-re', 'wall#'); $ssh->send("ping 172.16.10.29\n"); $ssh->expect(10,"\n"); $ssh->expect(1); $bla = $ssh->before();