L
ladygrinningsoul
I have a Perl program which runs a number of external programs. I want to
be able to read both stdout and stderr into separate variables. The 'Perl
Cookbook' states (I quote):
To read both a command's STDOUT and its STDERR separately, it's easiest and
safest to redirect them separately to files, and then read from those files
when the program is done: system("program args 1>/tmp/program.stdout
2>/tmp/program.stderr");
There has got to be a better way. Anyone?
be able to read both stdout and stderr into separate variables. The 'Perl
Cookbook' states (I quote):
To read both a command's STDOUT and its STDERR separately, it's easiest and
safest to redirect them separately to files, and then read from those files
when the program is done: system("program args 1>/tmp/program.stdout
2>/tmp/program.stderr");
There has got to be a better way. Anyone?