On Monday, May 20, 2002, at 08:54 , [EMAIL PROTECTED] wrote:
> Hi, > > I try to write a script that redirects its output, both out and error, to > a log-file, if it's possible to the screen as well. > > At the moment I'm doing this with > > open (FILE, ">whatever.txt"); > > open (STDOUT, ">&FILE"); > open (SDTERR, ">&FILE"); think about what you are doing here - you are closing any output that would go to stdout - hence to the screen, by writing it to the file What you want is something on the order of ... sub TEE_ME { my ($message) =@_; print $message; print FILE $message; } hence do the TEE_ME $alert_message ; would go to both the logfile and to the screen... ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]