Re: Redirect STDOUT and SDTERR

2002-08-28 Thread david
you probably want to save STDERR before redirect it to STDOUT so that later you can change it back: open(OLD_ERR,">&STDERR"); open(STDOUT,">$log_full_name"); open(STDERR,">&STDOUT"); #-- code #-- restore STDERR open(STDERR,">&OLD_ERR"); other than that. your code seems to be ok. david Nyimi

RE: Redirect STDOUT and SDTERR

2002-08-28 Thread Kipp, James
what is wrong with this way? is it not working? anway, i prefer to use CGI::Carp qw(carpout) it make redirection very simple and efficient. here is an example: # redirect standard error use CGI::Carp qw(carpout); open (ERRLOG ">/tmp/error.log") or die "..."; carpout(\*ERRLOG); > -Original M