in reply to Re: output to screen by hitting return key
in thread Program hangs while gathering external program output

I think you are close. Create a file with a newline in it. Then do this:
open( RES, "$program < mynewline.file |" ) or die $!;
Of course I think you should use IO::Pipe for that...

Who was it, Knuth?, that said, "Beware the above code... I havn't tried it."

  • Comment on Re: Re: output to screen by hitting return key

Replies are listed 'Best First'.
wooo, this trick works, but when java throws exception...Re: Re: Re: output to screen by hitting return key
by hdeng419 (Initiate) on Apr 19, 2002 at 01:28 UTC
    thanks for the response. It rocks! Any idea about the java exception problem in my previous post?
      redirect STDERR to STDOUT ?? Just a guess, but try this:
      "$program < newline.file 2>&1 |"