470,643 Members | 1,359 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,643 developers. It's quick & easy.

perl expect question: user interaction mid script

In regular (tcl) expect the following code waits for the user to enter
a password followed by enter and then returns to the script:

expect "Password:"
#ask user for password and then return to script
interact -nobuffer -re "(.*)\r" return

I am having problems writing this in perl expect. I used the
following:

$session->expect(60, -re, "Password:");
$session->interact(\*STDIN, "\r");

... but this does not seem to work. I just get another login request
like the inputted password is not going to the telnet login. Am I
missing something? Can anyone offer any suggestions?
Jul 19 '05 #1
0 3360

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Wayne Folta | last post: by
42 posts views Thread by Fred Ma | last post: by
17 posts views Thread by Michael McGarry | last post: by
2 posts views Thread by Dmitry | last post: by
reply views Thread by Kirt Loki Dankmyer | last post: by
6 posts views Thread by Michael L. Artz | last post: by
1 post views Thread by graphman | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.