MIME::Parser on 5.3

Sven Esbjerg esbjerg at xbsd.net
Wed Dec 15 15:21:31 PST 2004


I'm trying to write a perl script which parses mime encoded emails.
However using MIME::Parser on freebsd 5.3 results in an error:

MIME::Parser: can't flush:  at
/usr/local/lib/perl5/site_perl/5.6.1/MIME/Parser.pm line 789, <STDIN> line 71.

When I try the same on FreeBSD 4.8 no errors occur and the parsing of the
email finishes.

The line 71 is the NextPart of af multipart/alternative email:
------_=_NextPart_002_01C4E28F.5E8E7894

The Perl code needed to provoke this error is:

#!/usr/bin/perl -w

use strict;
$|++;

my $envelope = <STDIN>;
use MIME::Parser;
use MIME::Entity;

my $parser = MIME::Parser->new;
$parser->output_to_core(1);
$parser->tmp_to_core(1);

my $ent = $parser->parse(\*STDIN);
$ent->dump_skeleton;


Has anyone seen this error before? 
Any ideas for fixing this problem?

Sven Esbjerg


More information about the freebsd-perl mailing list