This question might have been asked in this forum before, but I could not find suitable answer in archives. Kindly direct me to node, if it was answered

Here is my query:

I want to run a program called "phylip" from perl script. "phylip" is a command line program, that has many sub-programs in it. Typically a phylip program appears like this when executed at command prompt

chak:~$ phylip sub_program_1 sub_program_1: the file "out-file" that you wanted to use as output file already exists. Do you want to Replace it, Append to it, write to a new File, or Quit? (please type R, A, F, or Q) ..... (phylip subprogram_2 ...... please type R, A, F, or Q) n times
Every-time I run phylip program, I know exactly when to type what character/string. (In above example I have to type: phylip sub_program_1, R, phylip sub_program_2, R).

My perl script generates files required for phylip program, so it would be cool, if I can automate these steps in perl script itself

Can anyone advice me on how to do this ?

Thanks

Chak


In reply to How to execute external programs from perl script by chak9988

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.