Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Is it possible to execute some command in qx argument

by afoken (Chancellor)
on May 06, 2017 at 15:04 UTC ( [id://1189669]=note: print w/replies, xml ) Need Help??


in reply to Is it possible to execute some command in qx argument

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". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1189669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-20 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found