title: writing html content in a perl script to a file in a specific directory
body: <p>I have the following code in a perl/cgi script:</p>
  
  <pre><code>$commonContent = &lt;&lt;HTML;
   &lt;font color="#CC0000"&gt;&lt;strong&gt;$errStr&lt;/strong&gt;&lt;/font&gt;
   &lt;h2 class="first"&gt;Request ID: $recId&lt;br /&gt;(Requested by: $userInfo-&gt;[1], $userInfo-&gt;[3], $userInfo-&gt;[5])&lt;/h2&gt;
   &lt;h3 style="margin-bottom:16px"&gt;Website: $website&lt;/h3&gt;
   &lt;p&gt;&lt;strong&gt;Request Type: $request&lt;/strong&gt;&lt;/p&gt;
   &lt;p&gt;Request Description:&lt;br /&gt;$description&lt;/p&gt;
   &lt;p&gt;Priority/Required Turnaround Time: $priority&lt;/p&gt;
   &lt;p&gt;Pre-deployment review: $review&lt;/p&gt;
   &lt;p&gt;&lt;strong&gt;&lt;i&gt;Estimated completion date for this request: $completionDate&lt;/i&gt;&lt;/strong&gt;&lt;/p&gt;
  HTML
  </code></pre>
  
  <p>I want to write the contents of the HTML to a file in a directory so I can keep it as a record.
  Does anyone know how to do this? I have read the perl cookbook second edition and pro perl on this issue but its all perlish to me.</p>