Hi, I have a perl script which connects to a remote linux box from my Windows, executes a perl script there, and copies the result file to my windows machine. The code looks like:
$server = "x.x.x.x"; my $putty = "C:\\Users\\xxxxxxx\\Downloads\\putty"; my $location = "C:\\Users\\xxxxxxx\\Documents"; open(my $pipe, "$putty\\plink -pw <password> root\@$server /usr/bin/pe +rl /manu/test/test.pl |") or die "unable to run command: $!"; print "Success"; open(my $pipe1, "$putty\\pscp -pw <password> root\@$server:/manu/test/ +logcollected $location |") or die "unable to run command: $!"; print "\n Again success";
This script works fine for me. But I have a hard coded value in the remote script, for which I need to dynamically pass a value from my windows machine. Please help me to know if there is any way for achieving it?
In reply to Pass a parameter to remote perl script by msomanat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |