in reply to Re: Process output redirecting
in thread Process output redirecting

I second BMaximus' suggestion of redirecting a standard filehandle like STDOUT to a log file.

However, I would suggest you keep STDOUT open as-is, and redirect STDERR instead. That way normal program output (via print) behaves like it always does, but warn and die output to your log file.

Replies are listed 'Best First'.
Re (tilly) 3: Process output redirecting
by tilly (Archbishop) on Apr 23, 2001 at 06:54 UTC
    Even better, use Tom Christiansen's implementation of Tie::Tee that he gives here...

    (There is also an IO::Tee, but it doesn't work like I would want. Yes, I am sending a bug report to the author.)