abecher has asked for the wisdom of the Perl Monks concerning the following question:
On unix, the output is as expected:-> more bug* :::::::::::::: bugSTDOUT.pl :::::::::::::: #!/usr/bin/perl print STDOUT "Running bugSTDOUTb.pl with backticks\n"; print STDOUT "stdout from bugSTDOUTb.pl=" . `bugSTDOUTb.pl` . "\n"; :::::::::::::: bugSTDOUTb.pl :::::::::::::: #!/usr/bin/perl print STDOUT "Running bugSTDOUTc.pl with system()\n"; system('bugSTDOUTc.pl'); print STDOUT "$0 done\n"; :::::::::::::: bugSTDOUTc.pl :::::::::::::: #!/usr/bin/perl print STDOUT "Hello world!\n";
But on windows, the STDOUT from the 3rd script is missing:-> bugSTDOUT.pl Running bugSTDOUTb.pl with backticks stdout from bugSTDOUTb.pl=Running bugSTDOUTc.pl with system() Hello world! /u/geaaron/bin/bugSTDOUTb.pl done
Where did the STDOUT go? Is there a solution to this problem? I really need windows to do the same thing unix does...D:\My\Tools>bugSTDOUT.pl Running bugSTDOUTb.pl with backticks stdout from bugSTDOUTb.pl=Running bugSTDOUTc.pl with system() D:\My\Tools\bugSTDOUTb.pl done
NOTE: This does not happen for STDERR. If you s/STDOUT/STDERR/g things work as expected on both platforms.
Thanks, Aaron
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: STDOUT missing on Windows, works on Unix
by ikegami (Patriarch) on Dec 13, 2008 at 07:25 UTC | |
by abecher (Novice) on Dec 13, 2008 at 09:59 UTC | |
by Bloodnok (Vicar) on Dec 13, 2008 at 12:18 UTC | |
|
Re: STDOUT missing on windows
by jwkrahn (Abbot) on Dec 13, 2008 at 07:17 UTC | |
by abecher (Novice) on Dec 13, 2008 at 10:09 UTC | |
by ikegami (Patriarch) on Dec 13, 2008 at 07:26 UTC | |
by jwkrahn (Abbot) on Dec 13, 2008 at 07:28 UTC | |
|
Re: STDOUT missing on Windows, works on Unix
by BrowserUk (Patriarch) on Dec 13, 2008 at 09:11 UTC | |
by ikegami (Patriarch) on Dec 13, 2008 at 09:25 UTC | |
by BrowserUk (Patriarch) on Dec 13, 2008 at 12:46 UTC | |
by abecher (Novice) on Dec 13, 2008 at 10:06 UTC | |
|