$acc = "root";
$ips=$ARGV; ## this holds the command needs to run on remote host.
@ipary= split(/\,/,$ips); ## split if there are more then one host
print "connecting ......$ipary \n";
system("ssh root\@$ipary $ARGV"); ## execute ssh command
Problem here is if I do
./program.pl 10.10.10.10 "pwd && ls "
It execute pwd on remote host BUT it execute ls on local host.
I have done same with shell script in a different environment(some where else) and it worked
I have used normal shell
ssh email@example.com "pwd && ls"
Above command execute both command on remote host.