in reply to parse email attachment

I wrote a compact little web mail program that uses POP3::Client and MIME::Parser. You may find a few hints (maybe even find some inspiration for how not to do it) in my code:
http://www.oakbox.com/scripts/oakmailer.shtml

Look in the "dump_ent" and "displayletters" subs.

oakbox