in reply to Format Streaming Text file with CR/LF
# Any system binmode $fh; local $/ = "\x0D\x0A"; while (<$fh>) { chomp; ... }
Note that Perl on Windows system covertly converts CRLF to LF on input, so you don't have to do anything.
# Windows only while (<$fh>) { chomp; ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Format Streaming Text file with CR/LF
by drodinthe559 (Monk) on Jul 22, 2008 at 19:13 UTC | |
by ikegami (Patriarch) on Jul 22, 2008 at 19:24 UTC | |
by BrowserUk (Patriarch) on Jul 22, 2008 at 19:24 UTC | |
by ikegami (Patriarch) on Jul 22, 2008 at 19:40 UTC | |
by BrowserUk (Patriarch) on Jul 22, 2008 at 19:48 UTC | |
by drodinthe559 (Monk) on Jul 22, 2008 at 19:45 UTC |