http://www.perlmonks.org?node_id=410318


in reply to Expect.pm problem

I expect that the problem is the lack of quotes around '-re' in your 4th line. If that fails you should set debugging on in Expect:

$Expect::Debug = 3; # or $obj->debug(3);

cheers

tachyon

Replies are listed 'Best First'.
Re^2: Expect.pm problem
by Anonymous Monk on Nov 25, 2004 at 18:28 UTC
    I don't have quotes around my -re and it works. It looks like your first instance of -re works, too. It does not have quotes.
    I suspect that if you remove the quotes on the last one it would work. In any case, I don't think you would be hanging on your last "send" command. I think it is the quoted -re line above it. Good luck.
      I have taken out all the quote in the -re, but the problem persisted. I know expect.pm works if I execute commands,(ie., ls, cat etc) when the prompt shows up at the end of the command execution. When I run other command (Oracle calendar command to be exact), it does not get back to the prompt. Instead, it shows a line that asks me for password. I have a feeling that expect is not looking at the right place. Any other suggestion is greatly appreciated. Thanks