in reply to Net::OpenSSH quoting problems

Net::OpenSSH can do all the quoting for you:
($output, $errput) = $ssh->capture('blah', 'blah', $object, 'blah', 'b +lah');
Or if you want to keep the command template as it is:
my $quoted_object = $ssh->shell_quote($object); $cmd = "blah blah $quoted_object blah blah"; ($output, $errput) = $ssh->capture2($cmd);
Read the Shell quoting section on the module documentation.

Replies are listed 'Best First'.
Re^2: Net::OpenSSH quoting problems
by jhuijsing (Acolyte) on May 20, 2014 at 10:28 UTC
    Found the problems - double faceslap 1. The squishy thing between the chair and the keyboard. incorrectly capitaltised word 2. One box I was testing on didn't have the latest software and didn't support the command I was trying to use