"My bet is that a string generated with plain "\n" behaves normal."
I went back and did an additional check on the data I used for my earlier tests. Each record in that test ends with just LF. For a specific test, I created two tiny files: check_lf which just contains "qwerty<LF>"; and check_crlf in which I forced a CRLF ending, its contents are "qwerty<CR><LF>".
$ for i in test_data test_data_Q check_lf check_crlf; do head -1 $i | +cat -vet; done XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$ QueryXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX$ qwerty$ qwerty^M$
For anyone unfamiliar with "cat -vet", a newline is shown as a "$" and a carriage return is shown as "^M".
Edit: I changed several instances of NL to LF. This was for consistency with other parts of my post as well as LF being a generally recognised de facto standard (CRLF is more usual than CRNL).
— Ken
In reply to Re^3: RE on lines read from in-memory scalar is very slow (cygwin and \n)
by kcott
in thread RE on lines read from in-memory scalar is very slow
by Danny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |