XP is just a number | |
PerlMonks |
Re^2: Effect of redirecting output to /dev/null on $? valueby afoken (Chancellor) |
on Aug 04, 2020 at 20:27 UTC ( [id://11120288]=note: print w/replies, xml ) | Need Help?? |
exec at the start of a command is one of the few things that are treated specially in Perl_do_exec3(), see Re^2: Improve pipe open? (redirect hook). It seems to disable the default optimization and forces the use of the default shell. There is a way to stay mentally sane on Unix/POSIX systems for I/O-redirection. Don't use system; instead, fork and exec manually:
Note that ONLY indirect object notation on exec prevents all attempts of perl to be smart. See The problem of "the" default shell. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|