perl5
perl5 copied to clipboard
Escape sequences \L, \U fall when we use them together
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)
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)