system(1,['perl.exe','myProg.pl','>out.txt','2>&1'])This doesn't seem to be useful. It calls the program '1', passing it one argument, the value of the stringification of the arrayref.
But perhaps this isn't the system we all know about. Perhaps it's a wrapper around something. Something that constructs the actual call to system. Now, the syntax suggest system is called with a list of arguments. Which means, no shell will be invoked. Which means, there's nothing out there that's actually going to interpret the > symbols. (And my bet is, myProg.pl ignores its arguments).
In reply to Re: Test whether STDOUT is connected to a file
by JavaFan
in thread Test whether STDOUT is connected to a file
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |