I feel your pain (there are still some old suns where I work, still running an ancient version of perl). Here's an idea that might keep things coherent for you. if the stuff that needs to be done on the remote box is always the same, there's no problem: put a shell or perl script there to do the job, and run that from your local machine via ssh in backticks.

But if the remote actions need to vary for whatever reason, your local perl script could probably build the necessary script that would need to run on the remote machine, save it to a local file, "scp" it to the remote box, and then run it via ssh in backticks. (But usually you can set it up so only one version of the remote script is needed, and it uses command-line args to handle the necessary variations.)


In reply to Re^5: back tick to do ssh by graff
in thread back tick to do ssh by convenientstore

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.