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

Re: [perl #130652] fail to return true loading .pm with <cr> EOL

Thread Previous | Thread Next
Dave Mitchell
January 30, 2017 13:10
Re: [perl #130652] fail to return true loading .pm with <cr> EOL
Message ID:
On Mon, Jan 30, 2017 at 07:09:45AM -0500, David Mertens wrote:
> As it is, heredocs would be broken for the OP, too, as would pod
> directives. I don't think Perl needs to convert \r to \n, it just needs to
> let \r represent end-of-line for syntax that expects significant whitespace.

Well, <<EOF expects exactly "\nEOF\n", so whitespace is significant there,
so presumably "\rEOF\r" should be interpreted as "\nEOF\n". Which means
    $a = <<EOF

would set $a to "A\n" rather than "A\n\rEOF\r\nB\n"

I think that way madness lies.

"Strange women lying in ponds distributing swords is no basis for a system
of government. Supreme executive power derives from a mandate from the
masses, not from some farcical aquatic ceremony."
    -- Dennis, "Monty Python and the Holy Grail"

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