in reply to Collecting output from Expect
$output = $exp->exp_after();
Use
$output = $exp->exp_before();
since you want to gather what the remote side sent before it sent the prompt, where expect breaks and yields control.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Collecting output from Expect
by paranoid times (Acolyte) on Oct 18, 2007 at 04:30 UTC |