Bug#587935: first/all character in uppercase
jidanni at jidanni.org
jidanni at jidanni.org
Fri Jul 2 18:27:45 UTC 2010
Package: perl-doc
Version: 5.10.1-13
Severity: wishlist
File: /usr/share/man/man1/perlfunc.1.gz
For both of these please add "doesn't alter any of the remaining
characters".
ucfirst EXPR
ucfirst Returns the value of EXPR with the first character in uppercase (titlecase in Unicode). This
is the internal function implementing the "\u" escape in double-quoted strings. Respects
current LC_CTYPE locale if "use locale" in force. See perllocale and perlunicode for more
details about locale and Unicode support.
If EXPR is omitted, uses $_.
lcfirst EXPR
lcfirst Returns the value of EXPR with the first character lowercased. This is the internal function
implementing the "\l" escape in double-quoted strings. Respects current LC_CTYPE locale if
"use locale" in force. See perllocale and perlunicode for more details about locale and
Unicode support.
If EXPR is omitted, uses $_.
E.g.,
$ echo ZZZZZZZZZ|perl -nwle 'print ucfirst'
ZZZZZZZZZ
is what I would call "all characters in uppercase", not "first character
in uppercase". Though I suppose a legal snotface would win in court.
(So one must do
$ echo ZZZZZZZZZ|perl -nwle 'print ucfirst lc'
Zzzzzzzzz
)
More information about the Perl-maintainers
mailing list