Thanks Scott, Troy, Charles & Gerrit, binmode() would work for the particular example but gets more complicated when I want to insert my own lines. In binmode print F1 "hi\n"; would not insert CR/LF like it's supposed to. In my context the best solution is to remove all trailing CR/LFs using s/[\r\n]+$// or chomp; $tmp=$/; $/="\r"; chomp; $/=$tmp; or similar, and append my own "\n" when I need to. There's only a small risk that the CR/LFs are intentional. Thanks again, Gavin Walker Canberra, Australia -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Cygwin 1.3.2-1 Problems with CR/LF in Perl
Walker, Gavin (CMIS, ANU - Acton) Wed, 22 Aug 2001 16:25:51 -0700
- Cygwin 1.3.2-1 Problems with CR/LF in Pe... Walker, Gavin (CMIS, ANU - Acton)
- RE: Cygwin 1.3.2-1 Problems with CR... Troy Noble
- Re: Cygwin 1.3.2-1 Problems with CR... Charles Wilson
- Re: Cygwin 1.3.2-1 Problems wit... Gerrit P. Haase
- RE: Cygwin 1.3.2-1 Problems with CR... Troy Noble
- RE: Cygwin 1.3.2-1 Problems wit... Gerrit P. Haase
- Walker, Gavin (CMIS, ANU - Acton)