title: Perl & MIME::Lite - Why are my .txt attachments blank?
body: <p>I've been using <a href="http://search.cpan.org/perldoc?MIME%3a%3aLite" rel="nofollow">MIME::Lite</a> for a short while now and have had no issues until now.</p>
  
  <p>I'm trying to attach a <code>.txt</code> file, but the file (after sent) has no content inside of it.</p>
  
  <p>I know the file has something in it because I'm creating the <code>.txt</code> file within the same script.  I know where the file is and can see its contents, but when I tell <code>MIME::Lite</code> to attach the <code>.txt</code> file, the email comes in with just the file name and is only 64 bytes.</p>
  
  <p>Here's the code for the <code>MIME::Lite</code> portion of my script:</p>
  
  <pre><code>$msg = new MIME::Lite(From =&gt; $from,To =&gt; $to,Subject =&gt; $subject,Data =&gt; "Data",Type =&gt; "multipart/mixed",); 
  $msg-&gt;attach(Type =&gt; 'TEXT', Data =&gt; @message);
  $msg-&gt;attach(Type =&gt; 'TEXT', Path =&gt; $stat_file);
  $msg-&gt;send();
  </code></pre>
  
  <p>Where <code>$stat_file</code> = <code>/in/some/dir/cheese/txt/somefile.txt</code></p>
  
  <p>Everything works fine except for the 3rd line.  It is correctly finding &amp; attaching the file that I'm pointing to, but when it hits my email, its a blank <code>.txt</code> file of 64 bytes.</p>
  
  <p>I've tried several variations of each of the first 3 lines of this code, but don't know what I'm missing.</p>
  
  <p>Anyone see a reason that this script would perform as explained?</p>