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
From:
ROYAL, Ryan
Date:
January 31, 2017 04:34
Subject:
RE: [perl #130652] fail to return true loading .pm with <cr> EOL
Message ID:
5395_1485792328_588F6448_5395_69_1_549c34d7eb884cf1988d4011f742504a@US1-02DAG01-P04.central.mail.corp
Or maybe the perl interpreter could throw a warning and/or exit if it sees statement terminations in Mac format i.e. ";\r"

"Warning: Mac file format not supported on this platform"

Thanks

-----Original Message-----
From: Dave Mitchell via RT [mailto:perlbug-followup@perl.org] 
Sent: Monday 30 January 2017 7:11 AM
To: ROYAL, Ryan
Subject: Re: [perl #130652] fail to return true loading .pm with <cr> EOL

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 that
    $a = <<EOF
    A
    \rEOF\r
    B
    EOF

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

I think that way madness lies.

--


The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.


Thread Previous | 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