http://www.perlmonks.org?node_id=786414

DentArthurDent has asked for the wisdom of the Perl Monks concerning the following question:

Hello fellow monks!

I've tried to RTFM, and I can't find the right FM. I have code that looks something like this:
@valid_types = `getValidTypes 2>&1`;
This works great on UNIX, where the default shell knows how to deal with the redirect, but on Windows I'm having issues. What I would like to do is have perl unify the STDOUT and STDERR from that program onto one stream without using the shell redirection. I looked at the documentation for open(), which I thought would be able to do that but I didn't see what the idiom might be.

Can anyone give me a pure Perl way to do this that would work on all platforms?

Thanks!
----
My mission: To boldy split infinitives that have never been split before!