open(LOG, "+>log.txt"); *STDERR = *LOG; *STDOUT = *LOF; # just in case some errors go to STDOUT ...