in reply to STDOUT missing on Windows, works on Unix

Windows handling of non-binary executables is buggy. It used to be you couldn't redirect the output of batch files at all. ("command /c batch > file" was required.) Change "script.pl" to "perlscript.pl" and it works.

Replies are listed 'Best First'.
Re^2: STDOUT missing on Windows, works on Unix
by abecher (Novice) on Dec 13, 2008 at 09:59 UTC
    This is exactly the info I was looking for!! The IO re-direction has plagued us for a long time since we've moved a lot of our unix tools to Windows. It's one of those issues that popped up every once in a while and we never understood why or how to fix it. I passed along the info that, when we're running a perl script that wants to capture the STDOUT of another perl script, to not just use:
    my $stdout = `otherscript.pl`;
    but instead to use:
    my $stdout = `$^X otherscript.pl`;
    Thank you very much!
    Aaron
      Hmmm, 'unix tools to Windows' - odd move - I wonder if you'll be moving back once XP goes EOL & you tire of waiting for vista ... to do anything!

      Just a thought

      A user level that continues to overstate my experience :-))