RE: running interactively

2005-10-12 Thread Bob Showalter
Adriano Allora wrote:
> ha to all,

Ha back!

> 
> I need to use a a shell-program but I cannot pass all the arguments to
> this program via system() function. In other words: the program
> doesn't accept all the arguments via command line: I need to open it
> and write interactively some instructions.

If you just need to feed input via stdin, you can to a pipe open:

   open F, "|/path/to/some_program" or die $!;
   print F "command\n";
   ...
   close F or die $!;

If the program expects to work with a terminal (tty), you can use the Expect
module to set up a pseudo-tty (pty) and interact with the program that way.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: running interactively

2005-10-12 Thread Chris Devers

On Wed, 12 Oct 2005, Adriano Allora wrote:

I need to use a a shell-program but I cannot pass all the arguments to 
this program via system() function. In other words: the program 
doesn't accept all the arguments via command line: I need to open it 
and write interactively some instructions.


Is there a module which works in this way?


Yes: Expect.pm


How can I do?


Read the documentation, then write a program that uses Expect.pm.


--
Chris Devers

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




running interactively

2005-10-12 Thread Adriano Allora

ha to all,

I need to use a a shell-program but I cannot pass all the arguments to 
this program via system() function. In other words: the program doesn't 
accept all the arguments via command line: I need to open it and write 
interactively some instructions.


Is there a module which works in this way?

How can I do?

Thank you all,



alladr


|^|_|^|_|^|  |^|_|^|_|^|
 || ||
 || ||
 ||*\_/*\_/*\_/*\_/*\_/* ||
 |   |
 |   |
 |   |
 | http://www.e-allora.net|
 |   |
 |   |
**


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]