my $msg = Mail::MboxParser::Mail->new([],[]); #### my $msgtext; { local $/; $msgtext = } my ($header, $body) = split /\n\r?\n/, $msgtext, 2; my $msg = Mail::MboxParser::Mail->new($header, $body); #### my @headerlines; while () { last if /^\r?\n/; push @headerlines, $_; } my $msg = Mail::MboxParser::Mail->new(\@headerlines, ""); #### my $msg = Mail::MboxParser::Mail->new(\@headerlines, []);