msomanat has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pass a parameter to remote perl script
by aitap (Curate) on Aug 04, 2012 at 09:19 UTC | |
|
Re: Pass a parameter to remote perl script
by Anonymous Monk on Aug 04, 2012 at 08:44 UTC |