#!/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:\\Nonexistant_DIR"; $pid = open3( $writer, $reader, $err, $SVN_LIST ); waitpid $pid, 0; while (<$err>) { # causes "Use of uninitialized value $err in " print "$_"; # and "readline() on unopened filehandle" } while (<$reader>) { print "$_"; # Prints the error message } $SVN_LIST = `svn status --depth infinity --no-ignore C:\\Nonexistant_DIR`; #error message comes out on STDERR since it isn't captured. print "$SVN_LIST"; # prints nothing. #### svn status --depth infinity --no-ignore C:\NON_EXISTANT_DIR > xxx 2> err