I am new here and to Perl - but found so much good information on this site that I thought I would give it a shot (still learning and forgive my ignorance).

On my server, there is a third party script that allows you to enter a console based application. Such as executing it:

> third_party_app <name_of_process_to_direct_to>
Will result in a command based prompt that I can send directives to in order to be executed:
SEND> do this; OUTPUT> Process Completed
What I want to do is automate this with a PERL script so that no user interaction is needed.

I have tried OPEN, and although the information I "print" is excepted, the output I redirect to returns a GLOB which bears no meaning to me. I need the output to see if I can move on and that the command I sent was received and processed.

I have also tried EXEC and SYSTEM, but that only leads me to have to type in the command myself again as the PRINT function will not do anything and is awaiting me to type something in.

Again - all new to this, but any ideas would be greatly appreciated.

Thanks,
KS


In reply to Sending and receiving output to a console based application by need2lease

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.