<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">I need to parse an email message which may be plain text or MIME  to get the header info and the text/plain content.  I'm trying to use MIME::Parser to do this but I'm confused about the objects I end up with,<DIV>and am hoping someone can get me over the hump.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>$mime_object = MIME::parse -&gt;new();</DIV><DIV>$entity= $mime_object-&gt;parse(\*FH); #parse the mail message</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Now I'm stuck.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> I'm supposed to be able to get a MIME::Header and MIME::Body out of the </DIV><DIV>$entity, but I'm lost in the syntax.  Particularly since I might see multiple</DIV><DIV>entities (I assume multipart/alternative or an attached vcf file produces multiple entities??)</DIV><DIV>I want to end up with $from, $subject, and  $body variables.</DIV><DIV><DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; min-height: 13px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 11.0px Helvetica">--</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 11.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>John Springer</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 11.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>Tech Dude</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 11.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>Democratic Party of Oregon</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 11.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>(503)224-8200 x235</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; min-height: 13px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; min-height: 13px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Helvetica; min-height: 13px; "><BR></DIV></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR></DIV></BODY></HTML>