in reply to Re^2: shell to perl equivalent
in thread shell to perl equivalent
You're missing quotes around some of your parameters.
sub paranthesis { my @paran = @_; system( 'scp', '/users/myuser/merc/rem_snew.pl', "$remoteuser\@$remoteserver:/users/$remoteuser/tmp/rem_snew2.p +l" ); my $result = `ssh $remoteuser\@$remoteserver perl /users/$remoteuser/tmp/ +rem_snew2.pl`; print "$result\n"; system( 'ssh', "$remoteuser\@$remoteserver", 'rm', "/users/$remoteuser/tmp/rem_snew2.pl" ); } paranthesis(@paran);
I see you using my, but this doesn't actually work under strict. That would be a goal worthy of your time, in my opinion.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: shell to perl equivalent
by mercuryshipz (Acolyte) on Feb 18, 2008 at 21:19 UTC | |
by graff (Chancellor) on Feb 18, 2008 at 22:09 UTC | |
by mercuryshipz (Acolyte) on Feb 18, 2008 at 22:31 UTC | |
by shmem (Chancellor) on Feb 18, 2008 at 21:55 UTC |