in reply to Re: Re: $/ and DOS files
in thread $/ and DOS files
So, you could implement a filter, and read from that filter. Or, slurp in the whole file and use split, which does allow regex for the delimiter. That is easy and speedy, if your file is small enough so memory is not an issue.
Something like:
—Johnmy @lines= split (/(?:\r?\n){2,}/, do { local $/; <INPUT>}); # lines already chomped, since delimiter not included.
|
|---|