in reply to how do I issue e-mail using perl? (was:Help)

Easy if you can install CPAN modules:
use strict; use Mail::Mailer; my $mailer = Mail::Mailer->new(); $mailer->open({ From => $from_address, To => $to_address, Subject => $subject, }) or die "Can't open: $!\n"; print $mailer $body; $mailer->close();
or directly with sendmail:
open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq") or die "Can't fork for sendmail: $!\n"; print SENDMAIL <<"EOF"; From: User Originating Mail <me\@host> To: Final Destination <you\@otherhost> Subject: A relevant subject line Body of the message goes here, in as many lines as you like. EOF close(SENDMAIL) or warn "sendmail didn't close nicely";
This was taken directly from the Perl Cookbook page 651. Go buy it!

The first one uses the CPAN module Mail::Mailer, there are lot's of other CPAN modules that send mail for you, such as Mail::Sendmail.

Use the second method __ONLY__ if you can't install CPAN modules on your school's computer, which you probably can't. Since this looks like a homework question, please do some studying and don't just cargo cut-n-hack. You'll probably be tested on this anyway. :)

Jeff

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)