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

[perl #84578] Bug report: error with \L, \l, \U and \u operators

Thread Next
Dan Collins via RT
August 15, 2016 16:40
[perl #84578] Bug report: error with \L, \l, \U and \u operators
Message ID:
On Tue Feb 22 02:31:59 2011, wrote:
> > print "\L\udD\n";   # Dd    It seems, first works \L, then \u. I
> > think, it's a bug!
> I tend to agree. I'd expect it to be equivalent to
> lc ucfirst "dD";
> But there's the "left to right" statement. Whatever that means.
> > print lc "\udD\n";  # dd    Yes, the result differ from previous
> > line!
> That appears to be inconsistent with "\L\udD\n";
> >
> > print "\L\Ua\n";    # Syntax error, oops!
> > print "\U\La\n";    # Syntax error
> > print "\L\La\n";    # Syntax error
> That's just plain weird, IMO.
> Abigail

This is profoundly strange, and is still in blead as described above. Precedence issues aside, I think that "\L\udD" should eq "dd", and "\L\UdD" should also eq "dd" (and in any event should be valid syntax). I thought I understood how these parsed after digging into the other precedence ticket out there, but evidently I do not. 

Dan Collins

via perlbug:  queue: perl5 status: open

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