title: How can I redirect STDOUT and STDERR to a log file in Perl?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1532544/can-i-send-stdout-and-stderr-to-a-log-file-and-also-to-the-screen-in-win32-perl">Can I send STDOUT and STDERR to a log file and also to the screen in Win32 Perl?</a>  </p>
  </blockquote>
  
  
  
  <p>I would to to redirect STDOUT, STDERR to <em>temp_log</em> and then to <em>logfile.txt</em> after the process is complete. The process runs for complete 20 minutes thus I would like to flock the <em>temp_log</em> in the time process runs.</p>