in reply to interact with a UNIX pgm

You don't necessarily need to pull out perl. Try this from the shell:
name_of_cmd <<END answer_to_question_1 answer_to_question_2 answer_to_question_3 answer_to_question_4 END
This works if you know the answers ahead of time. If you need to make decisions based on the output of the program, then Expect.pm is your baby.

thor

Replies are listed 'Best First'.
Re: Re: interact with a UNIX pgm
by lafont99 (Initiate) on Dec 27, 2002 at 19:30 UTC
    Well, I look at the expect seems that I have a lot of preliminary work to do, need MCPAN, need to download module and install them I am always missing some module or tool to do the Makefile.PL I tried the other option wiht the shell, but it seems that my UX program eats all the answer on the first prompt then he gives me my second question and I do not have anything left to answer, should I be putting some kind of control character after the first answer to stop the program from eating all my answer at once ?