Sounds like a job for a filter/sub-routine that simply sets the perl line separator variable for your application. Put another way, it should be fairly simple to separate the business logic from the desired output line ending.
Btw, Macs use a plain CR as the line ending for text files. Of course, the HTTP response headers use CR+LF on any/all platforms. At 09:54 AM 4/22/2008 -0400, Jun Wan wrote: >Hi, > >I am developing a web app, where the server needs to generate text document >and send back to browser and other client. Windows users often open it in >notepad, so I want it formatted properly there. However, the line break is >different on Windows (\r\n) and Unix (\n), I can of course detect the client >type and generate the text document accordingly, but this is rather >difficult due to our specific business logic and also we want to keep the >text generation logic rather simple. I am wondering if there are other ways >around this, for example, to set the mime type to application/rtf so that >wordpad is used to open the doc in windows. >Any other ideas? > >Jun > >---- >Jun Wan >GenomeQuest, Inc. > >_______________________________________________ >Boston-pm mailing list >[email protected] >http://mail.pm.org/mailman/listinfo/boston-pm _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

