perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

Escape sequences \L, \U fall when we use them together

Open kmhl opened this issue 3 years ago • 1 comments

When we use escape sequences \L and \U in series we get the syntax error message:

perl -E 'say "\L\UXsdf"'
syntax error at -e line 1, near "\L\U"
Execution of -e aborted due to compilation errors.

I think it isn't a syntax error and the code above should work.

If the code shouldn't work nevertheless then the error message should be fixed.

(v5.28.1)

kmhl avatar Aug 04 '22 21:08 kmhl

There are already plenty of issues describing that; There was also a recent PR https://github.com/Perl/perl5/pull/19999 to amend the documentation but that was closed (because the situation is more complex).

(That the error message could be improved is a valid criticism)

bram-perl avatar Aug 05 '22 09:08 bram-perl