in reply to Does IPC::Open3 uses temporary file?

I need to read STDERR and STDOUT simultaneously

In IPC::Open3, if you set the STDERR filehandle to 0, it will be automatically combined with STDOUT.

#my $pid = open3(\*WRITE, \*READ, \*ERROR,"bc"); my $pid = open3(\*WRITE, \*READ,0,"bc"); #if \*ERROR is false, STDERR is sent to STDOUT

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: Does IPC::Open3 uses temporary file?
by Courage (Parson) on Dec 03, 2004 at 19:57 UTC
    Thanks, very interesting information...

    It will not help me in my case (I can't mix STDERR and STDOUT, I should differentiate those) but this could help me in a next similar problem...

    Now I don't remember exact details (I am home, and that Perl program at work) but I suceeded mixing STDERR and STDOUT by something like this:

    open my $fhcmd, "$cmd args 2>&1 |";

    Best regards,
    Courage, the Cowardly Dog

        Ok, I solved my problem already.

        And thank you very much for many helpful advices!

        Best regards,
        Courage, the Cowardly Dog