in reply to Reading from STDOUT after Redirecting it.

Do you need to write the file? If you just want the output, you could use backticks. (Of course, I've never done this on Windows, so you might have to use IPC::Open, in which case your approach is much faster in development time.)

my @output = `$cmd $ip`;

Replies are listed 'Best First'.
Re: Re: Reading from STDOUT after Redirecting it.
by tcf22 (Priest) on Jul 02, 2003 at 23:08 UTC
    Definitely agree that backticks are the way to go. I have used them on Windows and I've never had a problem.