juo has asked for the wisdom of the Perl Monks concerning the following question:
Is there an easy way to get the STDOUT of running an exe program in windows straight into a scalar or an array instead it being printed to the STDOUT or first write it to a file and then read the file. In the example below I will run a program lmutil.exe which will return something to the screen. I am able to send that to a file instead of to the screen but I also want to skip the file and get it straight into my code. Is this possible ?
system(($FindBin::Bin."\\lib\\lmutil lmstat -c $VALOR_LICENSE_FILE")." + > ".($FindBin::Bin."\\lib\\result.txt"));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get result STDOUT of exe into scalar/array instead of file
by Zaxo (Archbishop) on Jan 21, 2004 at 03:03 UTC | |
|
Re: Get result STDOUT of exe into scalar/array instead of file
by pg (Canon) on Jan 21, 2004 at 03:05 UTC | |
|
Re: Get result STDOUT of exe into scalar/array instead of file
by Roger (Parson) on Jan 21, 2004 at 03:29 UTC |