develooper Front page | perl.perl5.porters | Postings from February 2011

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

Thread Next
From:
Serge
Date:
February 22, 2011 01:52
Subject:
[perl #84578] Bug report: error with \L, \l, \U and \u operators
Message ID:
rt-3.6.HEAD-24085-1298300278-1602.84578-75-0@perl.org
# New Ticket Created by  Serge 
# Please include the string:  [perl #84578]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=84578 >


Hello Perl maintainers,

 does the operators \L, \l, \U, and \u have right to left associativity,
or vice versa? I think, the operators must have right to left associativity as =.
Have the operators such property as a priority?

print "\u\LdD\n";   # Dd    It seems, first works \L, then \u. Right.
print "\u\la\n";    # A     First \l, then \u. Right
print "\l\ua\n";    # a     First \u, then \l. Right
print "\L\udD\n";   # Dd    It seems, first works \L, then \u. I think, it's a bug!
print lc "\udD\n";  # dd    Yes, the result differ from previous line!
print "\LdD\udD\n"; # dddd  It seems, first works \u, then \L, hm...

print "\L\Ua\n";    # Syntax error, oops!
print "\U\La\n";    # Syntax error
print "\L\La\n";    # Syntax error
print "\u\la\n";    # A     Right
print "\u\ua\n";    # A     Right

--
Regards,
 Serge


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