[Pdx-pm] UNIX NL verses MS(DOS) CRLF
joe at radiojoe.org
Tue Aug 31 11:51:43 CDT 2004
On Tue, 31 Aug 2004 at 9:25am -0700, Roderick A. Anderson wrote:
> I am processing files on a Windows system from a Linux system that has the
> share as a SMB mount. I'm using Marc Overmeer's Mailbox collection to
> process spam folders (mailboxen) and any time the process (re)writes the
> file I end up with NLs instead of CRLFs. This causes all kinds of
> heart-ache and discontent with the users as they can't pop the messages
> back using Outlook.
> Is there a setting I can use 'perl-wise' to make all "\n" writes be
> "\r\n". The perlport man pages indicate to me that $/ applies to read not
> write and the example only shows one character being used.
While not the same approach, you could just run the unix2dos utility
(most Linux distros have it) on all the mailbox files after your
program is done processing them.
More information about the Pdx-pm-list