Hi:
I started learning perl a month ago. So, excuse me, if this is a very
basic question. My problem is something like this. There is a command, say
foo, (which actually is a perl script), which is interactive, that is, it
prints questions on the terminal and accepts answers from the user. For some
questions, there are default answers which are taken if the user simply
presses 'Enter' key. Now, my problem is, I want to write a script to
intercept this command and supply answers for SOME of the questions, while
for other questions the user will be prompted for answer as before. First
I thought this would be very simple - all I had to do was open (FOO, "| foo
|"); Only later I realised I cannot do that. I looked at open2, but even
there the doc warns that it may not work as expected because of buffering
issues. So, what is the best way to go about my task? Hope I am clearer. For
simplicity sake, it can be assumed that the order of questions asked by the
original script is fixed. In other words, the second script doesn't need to
parse the questions, it can blindly assume that questions 1 and 4 have to be
passed on to the user and answers have to be gotten from the user, while for
questions 2 and 3, ans2 and ans3 must be supplied.
Thanks in Advance,
Lakshman.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]