Sponsoring The Perl Toolchain Summit 2025: Help make this important event another success Learn more
— |
#!/usr/bin/perl -w
my $msg = <<EOF;
Content-type: text/html
Content-transfer-encoding: 7bit
Content-disposition: inline; filename="hello.html"
<P ALIGN=CENTER>
Hello world!
</P>
EOF
my $parser = new MIME::Parser;
$parser ->output_to_core( 'ALL' );
my $entity = $parser ->parse_data( $msg );
my $enc ;
foreach $enc ( sort ( keys %{supported MIME::Decoder})) {
print '-' x60, "\n" ;
$entity ->head->replace( 'Content-transfer-encoding' , $enc );
$entity -> print (\ *STDOUT );
print '-' x60, "\n\n" ;
}
1;
|