in reply to How to give input to terminal (command window) in perl

It would be helpful if you explained your situation in some more detail. If there is just a fixed set of stuff that you are going to type into this program without caring what the prompts that it says are, then program <cmds.txt will often do the job. You could use Perl to make a shell script that potentially could do what you need. The most complicated version of this is having a Perl program "act like you would act" and respond differently to different prompts. Without more information, I am hesitant to recommend that approach because easier solutions might work for you.