in reply to perl -e in ssh

What's the error message?

Replies are listed 'Best First'.
Re^2: perl -e in ssh
by Anonymous Monk on Apr 13, 2010 at 16:58 UTC
    I am running this cmd
    $line=`ssh server 'perl \-e '\$s = shift; $SIG{ALRM} = sub { kill INT +=> \$p }; exec(@ARGV) unless \$p = fork; alarm \$s; waitpid \$p, 0 ' +3 'ls -ltra' ' `;
    and I am getting this error
    syntax error at -e line 1, near "=" Execution of -e aborted due to compilation errors. sh: =: not found
      That's a quoting issue: you have '...' around the entire perl command which you pass to ssh, and also '...' around the -e one liner - that's not going to work. Oh, and this has nothing to do with perl, but everything with the shell.

      You could try another quoting character, like ", and escape things where necessary.

        what does '...' mean ? where do you see it ?