laziness, impatience, and hubris | |
PerlMonks |
Re: Is it possible to execute some command in qx argumentby afoken (Chancellor) |
on May 06, 2017 at 15:04 UTC ( [id://1189669]=note: print w/replies, xml ) | Need Help?? |
Try to avoid qx, ``, single argument system, single argument exec, and single argument pipe open. All of these share a single problem: Except for very simple cases (alphanumeric-only commands), perl invokes "the" default shell, and things will go wrong from there quite fast. Simply because there is no single definition for "the" default shell. Default shells differ wildly in behaviour with varying versions of the operating system, and even more across operating systems. See Re^2: how do i run a shell command without waiting for the output for more details and a collection of background links. 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
|
|