I asked a related question a while ago, and got many helpful replies that are also applicable to your question. Please see Newlines: reading files that were created on other platforms.
In short, I chose to preprocess the input file to convert all newline characters to the current system's newline character:
$file =~ s[(\015)?\012(?!\015)][\n]g; $file =~ s[(\012)?\015(?!\012)][\n]g;
HTH
In reply to Re: File lines being treated as one.
by bobf
in thread File lines being treated as one.
by minixman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |