Command line parameters can be passed right after executable file name, according to the documentation:
Usage: plink [options] [user@]host [command]Run your commands like this: system("$putty\\plink -pw <password> root\@$server /usr/bin/perl /manu/test/test.pl $myparameter")
Inside the remote script, use @ARGV or Getopt::Std or Getopt::Long.
You can also write your script using Net::SSH, not PuTTY. Authorisation by public key is also safer when running a script.
In reply to Re: Pass a parameter to remote perl script
by aitap
in thread Pass a parameter to remote perl script
by msomanat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |