unix2dos and dos2unix is what you are looking for. I tried with perl also and was unsucessful also for same reason.
> -----Original Message----- > From: Ron Powell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 10:08 AM > To: '[EMAIL PROTECTED]' > Subject: Unix to dos; dos to unix... > > > There is a utility out there that will convert unix-style > end-of-lines (LF) > to dos-style (CR/LF)... > > Just for giggles, I'm trying to write a perl script to do this... > > Here's what I've tried... > > while (<INFILE>) { > $line = $_; > $line=~tr/\012/\015\012/; > print OUTFILE ("$line\n"); > } > > The problem is that the output, when viewed with notepad, contains > inappropriate line breaks... > > The same input file, when converted using the unix utility unix2dos, > converts "properly." This leads me to believe that I'm > missing something > obvious here.... > > I'm not asking for the answer per se, but perhaps a pointer? > > ---------- > Ron Powell > Senior IT Analyst & > Network Administrator > gomembers, Inc. (Baltimore Office) > [EMAIL PROTECTED] > 410-494-1600 x4058 > <<...OLE_Obj...>> > > > ---------------------------------------------------------------------------- -------------------- The views and opinions expressed in this email message are the sender's own, and do not necessarily represent the views and opinions of Summit Systems Inc. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]