Hey guys, I hope this finds you well. I'm using perl (well trying) to telnet to a remote server, run the command which will pipe its output to a file, wait until complete, then FTP it back to me. The command I want is... /apps/current/bin/getz -vf "off des" "[$database -type: primary|predicted]" &> /data/holdFile.txt so in perl after it has logged into the server (which I'm certain is working) I use:
$tel->print("/apps/current/bin/getz -vf \"off des\" \"[$database -type +: primary|predicted]\" &> /data/holdFile.txt"); $tel->waitfor('/$/');
The differences obviously by putting '\' in so the command line is passed the double quote marks properly. Unfortunately an error occurs when running this from perl (runs fine on the commandline when I put it the first code snippet in). SO I've got a feeling the backslashes are wrong, but what other special characters do I need to switch off here? Thanks again guys!

In reply to Telnet print issues... by Anonymous Monk

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.