This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #70836] Fix err msg for unterminated here-doc in eval
$ perl -e '<<foo'
Can't find string terminator "foo" anywhere before EOF at -e line 1.
$ perl -e 'eval "<<foo"; die $@'
Can't find string terminator "
foo" anywhere before EOF at (eval 1) line 1.
An internal implementation detail is leaking out.
When the lexer happens to have a multiline string in its line buffer
(in a string eval or quoted construct), it looks for "\nfoo" instead
of "foo". It was passing that same string to the error-reporting code
(S_missingterm), resulting in that extraneous newline.