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

[perl #128557] Trailing space in heredoc delimiter

Thread Next
From:
James E Keenan via RT
Date:
September 30, 2017 02:28
Subject:
[perl #128557] Trailing space in heredoc delimiter
Message ID:
rt-4.0.24-18591-1506738478-1177.128557-15-0@perl.org
On Wed, 06 Jul 2016 13:50:48 GMT, eda@waniasset.com wrote:
> 
> This is a bug report for perl from eda@waniasset.com,
> 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 (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=128557

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About