in reply to Re: Re: $/ and DOS files
in thread $/ and DOS files

As noted in another message, you can't compose a value to $/ that works like the magic built-in paragraph mode.

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:

my @lines= split (/(?:\r?\n){2,}/, do { local $/; <INPUT>}); # lines already chomped, since delimiter not included.
—John