Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a script that needs to invoke a linux command, that command then asks a qusetion and requires the user to press control-d. what i want to do is: The script asks a question then the user enter the variable then the command is invoked and the variable is inserted automatically and then also have control-d done automatically after the users presses enter. and I want to loop that for a certain amount of times this will amount will be set up by a variable. I know how to set up the question, then do the variable, and then I am lost. I guess what I am asking is how do I get the script to simulate the users keystrokes (control-d anyways) hope I explained that properly

Replies are listed 'Best First'.
Re: control-d
by cjf (Parson) on Mar 09, 2002 at 11:03 UTC