On 2005-04-01, Michael G Schwern <[EMAIL PROTECTED]> wrote:
>> commands with Perl?
>
> When using open2 you have to be careful to close WRITE before you READ so
> the program does not hang waiting for more input.  Once you've fixed that
> the technique above should be just fine.
>
> sub echo {
>       my($input, $command) = @_;
>
>       local(*READ, *WRITE);
>       open2(*READ, *WRITE, "$DARCS $command";
>               print WRITE "a\n";

Thanks for the tip. On this line, did you mean to write

        print WRITE "$input\n";

?

            Mark
-- 
http://mark.stosberg.com/ 

Reply via email to