in reply to Automating the input to exe file

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.