Skip to Content
Programming Perl, 4th Edition
book

Programming Perl, 4th Edition

by Tom Christiansen, brian d foy, Larry Wall, Jon Orwant
February 2012
Intermediate to advanced
1184 pages
37h 17m
English
O'Reilly Media, Inc.
Content preview from Programming Perl, 4th Edition

uc

uc EXPR
uc

This function returns an uppercased version of EXPR. This is the internal function implementing the \U escape in interpolated strings. For titlecase, use ucfirst instead.

Do not use uc for case-insensitive comparisons the way you may have once done in ASCII, because it gives the wrong answer for Unicode. Instead, use the fc (foldcase) function, either from the CPAN Unicode::CaseFold module or via use feature "fc" in v5.16 or later. See the section A Case of Mistaken Identity in Chapter 6 for more information.

Codepoints in the 128–256 range are ignored by uc if the string does not have Unicode semantics (and locale mode is not in effect), which can be difficult to guess. The unicode_strings feature guarantees Unicode semantics even on those codepoints. See Chapter 6.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Perl, 3rd Edition

Programming Perl, 3rd Edition

Larry Wall, Tom Christiansen, Jon Orwant
Programming the Perl DBI

Programming the Perl DBI

Tim Bunce, Alligator Descartes
Learning Perl, 8th Edition

Learning Perl, 8th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix

Publisher Resources

ISBN: 9781449321451Supplemental ContentErrata Page