yourshell
perl bugSTDOUT.pl
perl bugSTDOUTb.pl
perl bugSTDOUTc.pl
####
cmd.exe
perl bugSTDOUT.pl *
cmd.exe *
perl bugSTDOUTb.pl *
cmd.exe
perl bugSTDOUTc.pl
####
C:\test>type bug*
bugSTDOUT.pl
#!/usr/bin/perl
print STDOUT "Running bugSTDOUTb.pl with backticks\n";
print STDOUT "stdout from bugSTDOUTb.pl=" . `$^X bugSTDOUTb.pl` . "\n";
bugSTDOUTb.pl
#!/usr/bin/perl
print STDOUT "Running bugSTDOUTc.pl with system()\n";
system( $^X, 'bugSTDOUTc.pl' );
print STDOUT "$0 done\n";
bugSTDOUTc.pl
#!/usr/bin/perl
print STDOUT "Hello world!\n";
####
C:\test>bugSTDOUT.pl
Running bugSTDOUTb.pl with backticks
stdout from bugSTDOUTb.pl=Running bugSTDOUTc.pl with system()
Hello world!
bugSTDOUTb.pl done