On Sat, Feb 7, 2009 at 07:17, Chas. Owens <chas.ow...@gmail.com> wrote:
> On Fri, Feb 6, 2009 at 14:31, Ice Man <wjharris...@optonline.net> wrote:
>> Ok ..... so I have to start a program which is written in java.
>>
>> #!/local/bin/perl
>>
>> my $command = "/aa/bb/c/executable \&";
>> my $ret = 0;
>>
>> $ret = `$command`;
>>
>> exit $ret;
>>
>> The normal behavior of this executable is to list some information but
>> it never returns you to a prompt.  You have to hit the return key to
>> get the shell prompt back.
>>
>> The same thing is happening to this program.  Is there a way in perl
>> to pass a return "\n" on the command to be executed that would return
>> a prompt to the program so it does not hang?  I have tried the
>> following:
>>
> snip
>
> It sounds like you need IPC::Open2* or IPC::Open3**.  They allow you
snip

Too early in the morning, forgot the footnotes:

* http://perldoc.perl.org/IPC/Open2.html
** http://perldoc.perl.org/IPC/Open3.html

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to