in reply to Expect Issues
I was just looking at the Expect documentation, and the example looks different that your code. They didn't use new() to create the Expect object, instead they used spawn(). Also, they use spawn differently than you do. They have the command and arguments separated. So I think you should try changing the first few lines of your open_telnet subroutine to the following, and see if it helps.
sub open_telnet { my (@cmd, $res, $before, @parm); @cmd = ("telnet", "wogglebug"); $abi = Expect->spawn(@cmd) or die "Can't do expect'"; $res = $abi->expect(5, "/ #", "not known");
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Expect Issues
by HalNineThousand (Beadle) on Dec 31, 2010 at 16:22 UTC |