develooper Front page | perl.perl5.porters | Postings from August 2012

Newline legacy (Was: fixing smartmatch just hard enough (and when, too))

Thread Next
From:
jvromans
Date:
August 20, 2012 11:33
Subject:
Newline legacy (Was: fixing smartmatch just hard enough (and when, too))
Message ID:
20530.33510.586955.806930@phoenix.squirrel.nl
[Quoting demerphq, on August 20 2012, 19:24, in "Re: fixing smartmatc"]
> But perl considers "1" numerically equvalent to "1\n", and as far as I
> can tell without warning either:

Perl also happily considers "\n\n\n 001  \n  \t\r  \r\n" to be "1".
I've always wondered whether that was a good idea.

And, indirecty, this has led to the $ \z \Z uglyness.

-- Johan

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