lynx has asked for the wisdom of the Perl Monks concerning the following question:
I am running a script in Activestate Perl that uses a program running in the Cygwin enviroment. The program prints several lines of output.
Everyting seems to work fine, and the @result gets the first line of output from primer3, but then everything stops before it is printed. At least until I kill the primer3 process manually, then the script gets the rest of the output and continues. Just writing the input to a file and then doingmy $pid = open2(*Reader, *Writer, 'primer3_core.exe' ); print Writer "$primer3input\n"; close Writer; my @result = <Reader>; print "@result";
works fine. I have no idea why it's not working with open2, especially because the author of primer3 uses open3 in one of his own perl scripts...my $result = `cat tempfile | primer3_core.exe`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Windows/Cygwin and open2
by ikegami (Patriarch) on Aug 13, 2004 at 17:24 UTC | |
|
Re: Windows/Cygwin and open2
by ysth (Canon) on Aug 15, 2004 at 15:27 UTC | |
by lynx (Novice) on Aug 17, 2004 at 09:02 UTC | |
|
Re: Windows/Cygwin and open2
by crenz (Priest) on Oct 15, 2004 at 10:55 UTC |