$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}
In reply to Re: Collecting output from Expect
by shmem
in thread Collecting output from Expect
by paranoid times
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |