Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Perl Expect to hold for user input

Status
Not open for further replies.

sumncguy

IS-IT--Management
May 22, 2006
118
US

After racking my brains for a few weeks, I found that

Expects interact will hold and continue / return based on user input. Im now trying to accomplish that with the Perl Expect.pm module. It says ...
# $process->interact([$in_handle],[$escape sequence])

$child->interact();

$child->interact(STDIN,'X');
$child->interact([STDIN],['X']);
$child->interact( ,'X'); obviously not
$child->interact('X'); here too ..

also tried all the above with dub quotes.
.... must be missing something.

In expect

interact "X" return

Stops, give the user a router (for example) prompt back. When he/she hits X, the expect script continues.

Thanks in advance.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top