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.

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

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