in reply to sending mails daily/weekly from perl

My first question is, "what have you tried so far?"

My first suggestion is to use the cron(8) system to run the process that will be sending the messages. This will allow you to focus on writing code to send emails, without having to worry too much about how to trigger sending them.

As to sending the emails, there are a number of modules you can use-modules that come to mind having been mentioned for this purpose include the Email::* and Mail::* series of modules, as well as the MIME::Lite module. These modules generally include example code to illustrate how to do so. (Example below is taken directly from the documentation for MIME::Lite.)

# Sample code, taken directly from the MIME::Lite documentation use MIME::Lite; ### Create a new multipart message: $msg = MIME::Lite->new( From =>'me@myhost.com', To =>'you@yourhost.com', Cc =>'some@other.com, some@more.com', Subject =>'A message with 2 parts...', Type =>'multipart/mixed' ); ### Add parts (each "attach" has same arguments as "new"): $msg->attach(Type =>'TEXT', Data =>"Here's the GIF file you wanted" ); $msg->attach(Type =>'image/gif', Path =>'aaa000123.gif', Filename =>'logo.gif', Disposition => 'attachment' ); ### Send in the "best" way (the default is to use "sendmail"): $msg->send;

HTH.