neversaint has asked for the wisdom of the Perl Monks concerning the following question:
The result of that code is printed through STDOUT on the screen. Say it looks like this (there are thousands of lines):$ ./myexecutable.out -O option1 -W option2 -T option3
How can I write a Perl script that can capture those result into an array:MARK : foo MARK : bar
I know Perl has "system" and "exec" function. But I honestly don't know how to use them in this context.my @captured = [ 'MARK: foo', 'MARK: bar', ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Howto pass the STDOUT output of an executable into an array
by Corion (Patriarch) on Feb 13, 2006 at 11:01 UTC | |
|
Re: Howto pass the STDOUT output of an executable into an array
by tirwhan (Abbot) on Feb 13, 2006 at 11:06 UTC | |
|
Re: Howto pass the STDOUT of an executable into an array
by jeanluca (Deacon) on Feb 13, 2006 at 12:45 UTC |