i want to maintain this list locally and not on the remote machine,as i only want to store the messages that have been sent by using my email client.Is there some specific format that is used to distinguish different messages stored in a file.
There are a few common formats (for unixy mail programs - windows programs often use their own proprietary standards): mbox, maildir, and MH. You might take a look at Mail::LocalDelivery. Or I think the Mail::Box solution suggested will do what you want (don't use Mail::Box myself).