![]() |
|
XP is just a number | |
PerlMonks |
Re: How is the default "Input Record Separator" set?by BillKSmith (Monsignor) |
on Mar 15, 2021 at 19:27 UTC ( #11129717=note: print w/replies, xml ) | Need Help?? |
The variable $/ deals with records, the layer :crlf deals with lines. We tend to think of lines and records as being the same thing, but they do not have to be. I have never changed $/ for any reason except to make <> read a multi-line block (record) of text rather than a line. I expect the :crlf layer to translate windows line-separators (crlf), within the record, to perl line-separators (\n). Multi-line regexes used to parse the block work as expected.
Bill
In Section
Seekers of Perl Wisdom
|
|