in reply to How to see contents attachments of mail using perl script?
Most likely, you want to use MIME::Parser to split up the mail into its parts. Also consider looking at Mail::Action.