Redux: EOLs CRLF vs. NL

"Roderick A. Anderson" <[email protected]> Wed, 6 Oct 2004 10:08:03 -0700 (PDT)
Newsgroups gmane.comp.lang.perl.modules.mail-box
Message-ID <[email protected]>
I have confirmed (99% sure) that my script, that uses the Mailbox toolkit,
is writing LFs (NLs) instead of CRLFs when making _changes_ to a mbox
formatted file on a Windows system. This is creating all kinds of havoc 
with Mail clients.  Outlook Express won't POP the messages back and 
Mozilla Mail brings them back with portions of the header displayed as the 
beginning of the message.

I've looked at the file before and after and see the 0d0a are replaced
with 0a.

The problem is caused by the script runing on a *nix box against files on
Windows box (SAMBA mounted share) so this is a perl issue ... sort of.  
Is there a setting for the Mail-Box toolkit to tell it to write
Windows/DOS line endings?  I looked but didn't see (or used the wrong
search terms) any obvious setting to do this.
   If there isn't a setting Mail-Box setting I'll just handle it by
setting $\ (per Mark's message on 31 August).  The issue is part of the
time the script may be writing the mailbox/folder and the rest of the time
to the *nix system and files or processes.

My take is no one else is using this _odd_ of a setup or hasn't had this
problem so there is probably no real reason to ask for this as a
configurable setting.

I'll do the cheat for now ($\) and hope I missed a feature when 
researching this.


Best,
Rod
-- 
    "Open Source Software - You usually get more than you pay for..."
     "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"