in reply to Re: How to cpture output of interactive command using perl.?
in thread How to cpture output of interactive command using perl.?

Thanks for looking to it. By using this I am able to run the command in interactive mode , but still i am not able to capture the output of the executed command. Please elaborate more on how to cature the output.
  • Comment on Re^2: How to cpture output of interactive command using perl.?

Replies are listed 'Best First'.
Re^3: How to cpture output of interactive command using perl.?
by JavaFan (Canon) on Dec 10, 2008 at 10:37 UTC
    Well, you read the output from the handle. And by output, I mean whatever the program writes to STDOUT. If the program "outputs" by driving the terminal and printing to the terminal, it becomes something different.
    open my $fh, "cat |" or die; while (<$fh>) { print "Got: $_"; } close $fh or die; __END__ foo Got: foo bar Got: bar baz Got: baz ^D