Need help from PERL programmer for simple perl program
Posted on 2004-09-07
I am not a Perl programmer, and would love to get assistance for a Perl script that does the following:
1. open a file named “input.txt” in the current directory
The file is a text file containing lines such as follow:
2. The perl script will execute a C++ program named “program” which takes as an argument arg , the third string , in this case, eg. “string3” .
The program will cout a string in the standard out.
Executing “ ./program string3 “ will produce an output in the standard out , e.g “output1” .
3. the perl script will then produce an output file “output.txt” in the current directory, containing results of the execution, the format as follow:
“string3 | output1”
“string3.2| output3” and so on…
The script can be Perl or Shell script… can anyone help me out please?