ok, I am having issues with the following code STDERR seems to be ending up in the STDOUT handle on the open3

#!/usr/bin/perl use strict; use warnings; use IPC::Open3; chdir "C:\\"; my ( $writer, $reader, $err, $pid ); my $SVN_LIST = "svn status --depth infinity --no-ignore C:\\Nonexistan +t_DIR"; $pid = open3( $writer, $reader, $err, $SVN_LIST ); waitpid $pid, 0; while (<$err>) { # causes "Use of uninitialized value $err in <HANDLE> +" print "$_"; # and "readline() on unopened filehandle" } while (<$reader>) { print "$_"; # Prints the error message } $SVN_LIST = `svn status --depth infinity --no-ignore C:\\Nonexistant_D +IR`; #error message comes out on STDERR since it isn't captured. print "$SVN_LIST"; # prints nothing.

when I run this the SVN command in a cmd shell it will return via STDERR "svn: warning: 'C:\Nonexistant_DIR' is not a working copy". I have proved it to myself by running the following on a command prompt

svn status --depth infinity --no-ignore C:\NON_EXISTANT_DIR > xxx 2> e +rr

With this the file xxx is empty and the file err has the data in it.

What am I missing on the open3 that I am not getting STDERR output in what from my reading should be in the $err I pass.

Or is the issue I am having related to the fact I am running on a Windows platform

I am using activestate perl version v5.16.3 built for MSWin32-x86-multi-thread.


In reply to Issues with IPC::Open3 on win32 by dracos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.