in reply to Test whether STDOUT is connected to a file
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test whether STDOUT is connected to a file
by rovf (Priest) on Aug 18, 2010 at 13:51 UTC | |
by JavaFan (Canon) on Aug 18, 2010 at 14:35 UTC | |
by rovf (Priest) on Aug 19, 2010 at 07:41 UTC | |
by JavaFan (Canon) on Aug 19, 2010 at 08:30 UTC | |
by rovf (Priest) on Aug 19, 2010 at 08:59 UTC | |
|