You are viewing the version of this documentation from Perl blead. This is the main development branch of Perl. (git commit 5b9aabc0af37693cb16ea02f35aa054c9684e12c)
uc EXPR
uc

Returns an uppercased version of EXPR. If EXPR is omitted, uses $_.

my $str = uc("Perl is GREAT"); # "PERL IS GREAT"

This function behaves the same way under various pragmas, such as in a locale, as lc does.

If you want titlecase mapping on initial letters see ucfirst instead.

Note: This is the internal function implementing the \U escape in double-quoted strings.

my $str = "Perl is \Ugreat\E"; # "Perl is GREAT"