I was working on an old CGI script that piped to '/usr/lib/sendmail' and thought while I was upgrading it to use CGI.pm to also tackle that. MIME::Lite is very neat. Here's some easy code to compose/send an e-mail:
$msg = MIME::Lite->new(
To => "purdy\@nc.rr.com",
From => "purdy\@nc.rr.com",
Subject => "Hello, World!",
Data => $emessage
$msg->add( "Reply-To" => "purdy\@nc.rr.com" );
Of course, MIME::Lite has other cool stuff, too, like sending attachments, but perhaps that is for another day.