Полезная информация

Programming Perl

Programming PerlSearch this book
Previous: 3.2.177 ucChapter 3
Next: 3.2.179 umask

3.2.178 ucfirst

ucfirst EXPR

This function returns a version of EXPR (or $_ if EXPR is omitted) with the first character uppercased, that is, capitalized. This is the internal function implementing the \u escape in double-quoted strings. POSIX setlocale(3) settings are respected.

To force initial caps, and everything else lowercase, use:

ucfirst lc $word

which is equivalent to "\u\L$word".

Previous: 3.2.177 ucProgramming PerlNext: 3.2.179 umask
3.2.177 ucBook Index3.2.179 umask