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

Re^2: how to escape round parentheses in a system call

by ObiPanda (Acolyte)
on Jun 11, 2023 at 21:35 UTC ( [id://11152792] : note . print w/replies, xml ) Need Help??


in reply to Re: how to escape round parentheses in a system call
in thread how to escape round parentheses in a system call

thanks. It works exactly as needed.

Replies are listed 'Best First'.
Re^3: how to escape round parentheses in a system call
by haukex (Archbishop) on Jun 14, 2023 at 10:33 UTC

    It may work, but I disagree that it is a good solution: it will blow up when $_->{Sub_URL} contains shell metacharacters, and is a security hole if that variable contains any user input.

    See Calling External Commands More Safely. In this case I would recommend systemx from IPC::System::Simple, or at the very least the multi-argument system (as shown in other replies) with error checking (nobody showed this, but for an example see the first link).

    sigh