in reply to Program arg interfering with redirecting STDERR to STDOUT
It's the shell in either environment that provides for the command line redirection syntax (2>&1). When you use backticks, the shell is bypassed unless you explicitly state it.
Something along these lines might work.
my $shell = $^O eq 'MSWin32' ? "$ENV{comspec} /c " : "$ENV{shell} /?"; ## Bad guess my @output = `$shell java yourprog 2>&1`;
|
|---|