M
MarkD
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?
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?