in reply to Need mailing list code

Mail::Bulkmail handles much of what you want to do already. My Mail::SimpleList is a smaller example. You'll have to write a bit of code with either, but they handle the hard technical work (getting double opt-in working is a bit trickier, however).