Later Update:
This is bad advice. See posts below by
sgifford,
bart and
Anno.
Try using the ":crlf" directive with binmode() on the file handle, as in
binmode STDOUT, ':crlf';
$top->print(\*STDOUT);
# or
open MIME, '>', $fname;
binmode MIME, ':crlf';
$top->print(\*MIME);
I think this will do what you want.
Updated:
Thinking about it a little further, since MIME::Entity's print method takes a file handle as a parameter, it makes sense that it would leave control of line termination for the output file to the module that manages the output file handle, while using "\n" as the conventional line terminator within code. The binmode() function is Perl's way of controlling line termination on a file handle.