Create a text file with your message and another with the addresses of your recipients (each one should be followed by a newline).
Then change the four variables at the top of the script and run it.
I've just written this and so I haven't really tested it but it should work.
Code:
#!/usr/bin/perl
$messagefile = "/path/to/messagefile";
$addressfile = "/path/to/addressfile";
$youraddress = "someone\@somewhere.com";
$subject = "The monthly mailing list message.";
open(DATA, "$messagefile") || die ("Could not open message file");
@message = <DATA>;
close(DATA);
open(DATA, "$addressfile") || die ("Could not open address file");
@addresses = <DATA>;
close(DATA);
foreach $address (@addresses){
open(MAIL, "|/usr/lib/sendmail -t") || die ("Could not open sendmail");
print MAIL "To: $address";
print MAIL "From: $youraddress\n";
print MAIL "Subject: $subject\n\n";
print MAIL @message;
close(MAIL);
}
$num = @addresses;
print "Message sent to $num people\n";
exit;