Perl version

Modules

  • ABCDE
  • FGHIL
  • MNOPS
  • TUX

lc

Perl 5 version 14.0 documentation
Recently read

lc

  • 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 (for serious hackers only) in perlunicode.) Otherwise Unicode semantics are used for the case change.

    • Otherwise, if use locale is in effect

      Respects current LC_CTYPE locale. See perllocale.

    • Otherwise, if use feature 'unicode_strings' is in effect:

      Unicode semantics are used for the case change. Any subroutine named ToLower will be ignored.

    • 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.