Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Getting error when runing perl through ssh

by perlknight (Pilgrim)
on Nov 26, 2005 at 15:30 UTC ( #511903=perlquestion: print w/replies, xml ) Need Help??

perlknight has asked for the wisdom of the Perl Monks concerning the following question:

all, this ran fined locally:
perl -ibkup -ne '{ s/; print "$_\n";}' tnsn +ames.ora
But it bails out on ssh, like so:
ssh -lroot somehost "perl -ibkup -ne '{ s/; + print \"$_\n\";}' tnsnames.ora"
Any idea why? Thanks.

Replies are listed 'Best First'.
Re: Getting error when runing perl through ssh
by PodMaster (Abbot) on Nov 26, 2005 at 15:57 UTC
    Probably because you, your shell and the remote shell disagree on what its trying to execute (which arguments to give to perl).

    Try echo to see what's going on.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Getting error when runing perl through ssh
by tirwhan (Abbot) on Nov 26, 2005 at 16:09 UTC
    Use the absolute path for the perl executable, it is possible that your path is not set as you expect it. So do
    ssh -lroot somehost "/usr/bin/perl -ibkup -ne '{ s/; print \"$_\n\";}' tnsnames.ora"

    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://511903]
Approved by planetscape
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2023-03-28 05:55 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (66 votes). Check out past polls.