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"));
In reply to Get result STDOUT of exe into scalar/array instead of file by juo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |