In the middle of the Perl script there is a system command that I want to execute. I have a line that contains the data that needs to be passed to stdin (the command only accepts input from stdin), and I need to write the output written to stdout. I looked at various methods for executing system commands in Perl, and openI think you need a function , except that it looks like I can only write stdin or stdout, not both.
At the moment, it seems to me that the best solution is to use open, redirect stdout to a temporary file and read from the file after the command completes. Is there a better solution?
user316
source
share