I don't have time to figure this out right now, but I spotted some "harmless" problems:

print @input[$x]; should be print $input[$x]; for performance and readability reasons.

Why do you use $per in if ($per = m/(\d+\.\d+)% identity/g)? You promptly overwrite the value.
if ($per = m/(\d+\.\d+)% identity/g)
boils down to
if (m/(\d+\.\d+)% identity/g)
which in turn reduces to
if (m/(\d+\.\d+)% identity/)

Why do you use $name in if ($name = m/>>(.{4,6})(.*)/g)? You never use it anywhere.
if ($name = m/>>(.{4,6})(.*)/g)
boils down to
if (m/>>(.{4,6})(.*)/g)
which in turn reduces to
if (m/>>(.{4,6})(.*)/)

Why do you use $match in if ($match = m/^($seqname)(.*)/)? You never use it anywhere.
if ($match = m/^($seqname)(.*)/)
boils down to
if (m/^($seqname)(.*)/)

There's no use for the g modifier in if(m/>>/g).

It would be a good idea to check if system returned an error.

While these changes don't have any visible effect on the code's execution, they will make your code easier to read. Anyone reading the code as is will likely lose confidence in you.


In reply to Re: Automating the input to exe file by ikegami
in thread Automating the input to exe file by FarTech

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.