A Perl built-in function that takes one argument and returns it (or $_, if no argument is given) with its first character lowercased. This function supports use locale, and is used to implement the "\l" (that's a lowercase ell, not a numeral one) escape in string literals with double quotes or qq. Example of usage:

$_ = 'JMp';
print lcfirst 'Hello';  # prints "hello"
print lcfirst 'hello';  # prints "hello"
print lcfirst 'HMM...'; # prints "hMM..."
print lcfirst;          # prints "jMp" (note use of $_)
print lcfirst $_;       # same thing
print lcfirst '84';     # prints "84"

See also the perldocs perlfunc, (possibly) perllocale and perlop, and/or the other similar perlfuncs lc, uc, and ucfirst.

(Source: memory/experience and perldoc.)

Log in or register to write something here or to contact authors.