- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

lc EXPR

lc

Returns a lowercased version of EXPR. This is the internal function implementing the \L escape in double-quoted strings.

If EXPR is omitted, uses $_.

What gets returned depends on several factors:

If use bytes is in effect:
On EBCDIC platforms
The results are what the C language system call tolower() returns.
On ASCII platforms
The results follow ASCII semantics. Only characters A-Z change, to a-z respectively.
Otherwise, If EXPR has the UTF8 flag set
If the current package has a subroutine named ToLower, it will be used to change the case (See "User-Defined Case Mappings" (perlunicode) in the Perl Unicode and Locales Manual.) Otherwise Unicode semantics are used for the case change.
Otherwise, if use locale is in effect
Respects current LC_CTYPE locale. See "Perl locale handling (internationalization and localization)" (perllocale) in the Perl Unicode and Locales Manual.
Otherwise, if use feature 'unicode_strings' is in effect:
Unicode semantics are used for the case change. Any subroutine named ToLower will not be used.
Otherwise:
On EBCDIC platforms
The results are what the C language system call tolower() returns.
On ASCII platforms
ASCII semantics are used for the case change. The lowercase of any character outside the ASCII range is the character itself.
ISBN 9781906966027Perl Language Reference ManualSee the print edition