This is bad advice. See posts below by sgifford
Try using the ":crlf" directive with binmode() on the file handle, as in
I think this will do what you want.
binmode STDOUT, ':crlf';
open MIME, '>', $fname;
binmode MIME, ':crlf';
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.