in reply to Creating MIME entities with CRLF line endings
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
I think this will do what you want.
binmode STDOUT, ':crlf';
$top->print(\*STDOUT);
# or
open MIME, '>', $fname;
binmode MIME, ':crlf';
$top->print(\*MIME);
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Creating MIME entities with CRLF line endings
by sgifford (Prior) on Mar 16, 2007 at 14:20 UTC |
In Section
Seekers of Perl Wisdom