I am not a Unix GURU, so some of the usage for rsh that I have below is probably jacked up, but Sounds like this is the scenario to me.
$string = "This is my string"; my $output = `rsh -l remoteuser host.example.com "perlprog.pl $string" +`;
With the above code, $string is going to equal This is my string not "This is my string". Therefore when rsh is called as an external application, the resulting command on the remote system is perlprog.pl This is my string instead of the desired perlprog.pl "This is my string"
Seems like you should be able to add the double quotes to the parameter by escaping them. Similar to the following.
$string = "This is my string"; my $output = `rsh -l remoteuser host.example.com "perlprog.pl \"$strin +g\""`;
In reply to Re^3: Double double quoting - nested macro calls
by SitrucHtims
in thread Double double quoting - nested macro calls
by kenm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |