in reply to Splitting up quoted/escaped command line arguments

It seems the arguments are already properly quoted in the database to be part of one string. Why don't you use just the exec $string?
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: Splitting up quoted/escaped command line arguments
by Tommy (Chaplain) on Feb 11, 2014 at 18:23 UTC

    ...Because that sends it through a shell. I need to avoid that.

    Tommy
    A mistake can be valuable or costly, depending on how faithfully you pursue correction
      But hose commands would not work unless you pass them through a shell!

      Or if you prefer to view it from a different angle, you will have to implement in your program all the shell functionality used by those commands!

      Update: And BTW, if those commands involve calling ssh, then a shell would be invoked at the remote side. This is an unavoidable feature of the SSH protocol.

        Yes, I'm keenly aware that a shell is going to be invoked on the remote side. That's fine. I need to avoid it on the local machine. Why do you say that these commands won't work unless passed to a shell vs calling ssh directly? The perldocs don't seem to agree with your assertion.

         

        Tommy
        A mistake can be valuable or costly, depending on how faithfully you pursue correction
      I need to avoid that.
      Why?

        I'll potentially be doing hundreds of these calls in parallel and I have to avoid the overhead of shelling out every time. I've already tested and the difference is very significant when opening to ssh vs opening to a shell opening to ssh. There's a huge slowdown on the local machine when I involve the shell.

        Tommy
        A mistake can be valuable or costly, depending on how faithfully you pursue correction