ladygrinningsoul wrote:
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):
There has got to be a better way. Anyone?
You should have read the book a little further. See recipe 16.9, (or at
least it is under that number in my copy), or jump straight to perldoc
IPC::Open3.
Using it is rather prone to deadlock, though.
If you are doing it as an excercise only, it is also posible to do
everything via fork(), exec(), and POSIX::dup().
--
Alexey 'Kaa the Snake' Kiritchun