in reply to Cannot read from STDIN and write to STDOUT using IPC and pipes

I think the problem is that the line my $line1 = <$RDR>; tries to read until the next input record separator, which is usually a newline.

The program's output doesn't seem to have a newline.

You could try to use Expect.pm or something along these lines, or change $/ to ':' (or whatever your program uses to terminate the prompt)

Replies are listed 'Best First'.
Re^2: Cannot read from STDIN and write to STDOUT using IPC and pipes
by abhinav (Novice) on Oct 11, 2007 at 10:17 UTC
    I tried to implement your suggestions.Even if I dont read anything from the read handle (just write the user name and reason to the write handle) even then program does not run.So problem cant be solved with changing input record separator.I am using PERL Version 5.8.3 which does not have Expect.pm .What else can I do with the current version for the script to run?
      The language is called Perl, the interpreter perl. But what is PERL?

      If Expect is not available, you can install it from cpan.