in reply to Net::OpenSSH capture and cmd w/args

It will probably work if you use $cmd with an absolute path, e.g. /usr/local/bin/whatevercmd?
Add warn "($cmd) ($arg1) ($arg2)" as diagnostic output.