Ian said:
Do you mean that your script contained
print "MY_WRITE\n";
end you have now corrected it to
print MY_WRITE "4\n";
and everything is OK now?
Or do you mean your script contained the latter all along but that
instead of using copy & paste you are still retyping and making
typing mistakes. In which case you still want help?
IIRC on a Unix host, "\n" will emit a linefeed character, not the
carriage-return character you mention. This might be causing you
problems?
Hi,
Let me clarify the situation without actual code,
:
I have a perl script which cannot be modified as its not maintained by
me, and it does not accepts command line parameter, once executed the
script provides options like (1,2,3,..7) which once selected the script
proceeds,
:
For that I tried to use open2, as
$prog="perl makefile.pl";
$pid = open2 (\*READ,\*MY_WRITE,$prog)
right after opening the $prog, I get Error out from $prog that I
selected unknown option, which should come if I execute the $prog
standalone and on select option I press "enter"->return ,
If I try to read from READ it blockes after printing till select option
is displayed on STDOUT, but If I print MY_WRITE with the option I want
want to execute form $prog before reading from READ it does not gets
block
A valuable inforamtion I missed, sorry for that, I am on win32 XP
machine so probably I cannot use perl Expect module
--