Is there documentation of the interactions between \Q, \U, \L and \E escapes in quoted strings?

I have seen Quote and Quote like Operators, but this doesn't describe how these escapes nest that I can see.

$ perl -e 'print "\Qab,cd\Uef,gh\Lij,kl\Emn,op\Eqr,st\Euv,wx\n";' ab\,cdEF\,GHij\,klmn\,opqr,stuv,wx

One might expect

ab\,cdEF\,GHij\,klMN\,OPqr\,stuv,wx

update: or ab\,cdEF\,GHij\,klmn,opqr,stuv,wx.

update: or even ab\,cdEF\,GHIJ\,KLMN\,OPqr\,stuv,wx.

and

$ perl -e 'print "\Uab,cd\Qef,gh\Lij,kl\Emn,op\Eqr,st\Euv,wx\n";' AB,CDEF\,GHij,klmn,opqr,stuv,wx

where one might expect

AB,CDEF\,GHij\,klMN\,OPQR,STuv,wx

Is there a rationale for how they nest and override each other? I find the inconsistency between \Q on the one hand and \U and \L on the other hand to be surprising.


In reply to Interactions of \Q, \U, \L and \E by ig

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.