script to run the program

A

a

I need to run a program that need input at run time.
Is it possible to simulate this by perl?
Thanx
 
J

Josef Moellers

a said:
I need to run a program that need input at run time.
Is it possible to simulate this by perl?
Thanx

It depends.
You can open a pipe to the program and send the input through the pipe
(beware of buffering):
open(DST, '|', $program);
print DST "Input\n";

Or look at Perl/Expect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top