See MIME::Parser. Also, if a script can read from STDIN, you can feed it from a file.
In reply to Re: Email Attachment by Corion in thread Email Attachment by Anonymous Monk