Are you aware of MIME::Tools ? (available, for example in
http://www.iglu.org.il/pub/CPAN/modules/by-module/MIME/MIME-tools-5.411a.tar.gz
)

I did not *really* work with it. Few days ago I gave it a quick trial, and it
seemed to be able to do what you are looking for.

I abandoned it (for the mean while) since I was annoyed by its automatical
creation of a file for each attachment. When you learn how to disable this,
please let me know.

The following will eat a message from stdin and print out its internal layout
(and create plenty of attachment files on disk)


#!/usr/local/bin/perl -w

use MIME::Parser;

my $parser = new MIME::Parser;
$parser->decode_headers(1);
my $entity = $parser->parse(\*STDIN);

$entity->dump_skeleton;

-- 
Dan Kenigsberg        http://www.cs.technion.ac.il/~danken        ICQ 162180901

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to