my $old_stderr = STDERR; open STDERR, ">mylogfile.log";