summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorScott Baker <scott@perturb.org>2023-02-09 13:46:18 -0800
committerKarl Williamson <khw@cpan.org>2023-02-10 21:31:49 -0700
commit8da6832dfbca54f8380d08a45b2ca920607bf04c (patch)
tree6913952e93fe521e337bc2f1963b1be2f4295ad0 /pod/perlfunc.pod
parent2aa450394fed0a447d8df334bc797a50a81aebe3 (diff)
downloadperl-8da6832dfbca54f8380d08a45b2ca920607bf04c.tar.gz
Add examples and clarify wording
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod16
1 files changed, 11 insertions, 5 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index c69da92cae..9f510e9150 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -9660,17 +9660,23 @@ X<ucfirst> X<uppercase>
=item ucfirst
-=for Pod::Functions return a string with just the next letter in upper case
+=for Pod::Functions return a string with the first letter in upper case
-Returns the value of EXPR with the first character in uppercase
-(titlecase in Unicode). This is the internal function implementing
-the C<\u> escape in double-quoted strings.
+Returns the value of EXPR with the B<first> character in uppercase
+(titlecase in Unicode).
-If EXPR is omitted, uses L<C<$_>|perlvar/$_>.
+ my $str = ucfirst("hello world!"); # "Hello world!"
+
+If EXPR is omitted, C<ucfirst> uses L<C<$_>|perlvar/$_>.
This function behaves the same way under various pragmas, such as in a locale,
as L<C<lc>|/lc EXPR> does.
+B<Note:> This is the internal function implementing the C<\u> escape in
+double-quoted strings.
+
+ my $str = "\uperl\E is great"; # "Perl is great"
+
=item umask EXPR
X<umask>