My thanks to Jim Gibson <jimsgib...@gmail.com> for responding and
attempting to help.

I dredged a little more in the available documentation and examples,
and finally came up with the following which works and which also
does the decoding that (of quoted-printable) that I needed...


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

use strict;

use MIME::Parser;
use MIME::Decoder;

my $parser = new MIME::Parser;

my $entire = $parser->parse(\*STDIN) or die "parse failed\n";

my $etype = $entire->effective_type();

print STDERR ($etype, "\n");

my $part0 = $entire->parts(0);

my $body = $part0->bodyhandle;

my $IO = $body->open("r")      || die "open body: $!";

my $decoder = new MIME::Decoder 'quoted-printable' or die "unsupported";

$decoder->decode($IO, \*STDOUT);


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to