$terminal->send("sys hard\r\n");
i.e. sending CRLF? The script looks ok, and re-opening filehandles is ok too. It must not be Expect's fault if there's nothing to read from the socket; if nothing was sent, that's perfectly ok. I guess the remote shell doesn't grok the input is terminated, so I'd play with various setings of CRLF translations.
HTH,
--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^3: Expect.pm early termination?
by shmem
in thread Expect.pm early termination?
by Elijah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |