in reply to Re: Reading text file with <CR> line endings
in thread Reading text file with <CR> line endings
Another idea I considered was to slurp in the whole file as binary - the max size of this file is small enough to do that. Then use split to do my own line division. The input line separator cannot be a regex, but split can use a regex.
As I mention in my now updated question post, I found out where this "weird duck" file came from. There is no need for me to solve this tricky problem at this time. Users do the darndest things! The "hey, don't do that!" answer appears to meet all of my requirements and user is fine with that "solution". Not every complicated problem requires an actual implementation. At some point in the future, I may have to actually implement a solution for this problem and what I've learned in this thread will be helpful. I think there are also fine points in this thread that could be useful for other problems. In my opinion, you can never "know too much" about Perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reading text file with <CR> line endings
by hippo (Archbishop) on Mar 06, 2018 at 09:23 UTC | |
by Marshall (Canon) on Mar 06, 2018 at 18:26 UTC |