|
From: <ex...@ih...> - 2002-05-24 04:13:42
|
I'm running expect to talk to a script and I have the questions
(that the script asks) and the answers. I am running it inside a foreach loop
based on number of questions/answers.
Like so:
$exp = Expect->spawn('script');
foreach $qa (0..$#qaarray)
{
$exp->expect($timeout, $qaarray[$qa])
$exp->send($aarray[$qa]);
}
The time between when an answer is given and when a new
question is asked varies. In some cases it may take an
hour and in others less than 1 second. The problem I have
is that expect timesout and does a hard_close after some
amount of time. I need it to wait for the next question
no matter how long it takes. I've read the docs and tried
a lot of different things.
|