in reply to Controlling Email on Windows with Perl
You can do what saintbrie suggests. Just compleatly get rid of the email client and have your script dl the email and store it in mbox format. But one more reference for you. You may want to look at PopFile. Popfile acts as a proxy between your email client and your server. It can classify your emails for you and you can probably add some plug-ins to do the manipulation you are looking for. They are currently developing plug-ins that adds newsgroup classifications; it is designed to be modular. Worst case it will give you some ideas.
Ever since my email was harvested I have used Popfile very successfully to classify my email. I promote it whenever I can. It turned a bad situation into something very tolerable.
PS. Yes you could do something with Win32::OLE but why... Don't get me wrong if you look at my other posts I am a proponent of it. The problem is you would be locked into Outlook. By using a proxy or a perl script that does it all you would be able to use any client you wanted without recoding.