develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #128557] Trailing space in heredoc delimiter

Thread Next
James E Keenan via RT
September 30, 2017 02:28
[perl #128557] Trailing space in heredoc delimiter
Message ID:
On Wed, 06 Jul 2016 13:50:48 GMT, wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.40 running under perl 5.22.2.
> -----------------------------------------------------------------
> [Please describe your issue here]
> The end marker for a here-document must be the exact string, without
> trailing spaces.  If the heredoc begins with <<END but instead of
> 'END' you have 'END ', Perl treats that as part of the quoted string
> without warning.

I am unsure as to the specific case you are discussing.

In the attachment, the first heredoc is defined with '<<END;'.  The second is defined with '<<END ;'  In both cases there is no whitespace after the terminator 'END'.  Both "work" in the sense that both compile and print -- even though the second definition looks weird.

Is that the case you are concerned about?  Or something else?

Thank you very much.
James E Keenan (

via perlbug:  queue: perl5 status: new

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About