Just wanted to add that due to the way ssh executes commands, you may need to shell-quote your command line arguments twice if they have _any_ odd characters:
% ssh someserver perl - "foo bar" < localscript.pl $VAR1 = [ 'foo', 'bar' ]; % ssh someserver perl - "foo (bar)" < localscript.pl bash: -c: line 0: syntax error near unexpected token `(' bash: -c: line 0: `perl - foo (bar)' % ssh someserver perl - '"foo (bar)"' < localscript.pl $VAR1 = [ 'foo (bar)' ];
In reply to Re^3: run perl script with cmd line in shell
by Anonymous Monk
in thread run perl script with cmd line in shell
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |