Perl lcfirst Function
The lcfirst function is used to convert the first character of a string in lowercase and to return the new string.
The Perl lcfirst takes a string, converts its first character in lowercase and than returns the new string.
There are two syntax forms for this function:
In the second syntax form, EXPR is omitted, so the Perl lcfirst function uses the special variable $_. As with other functions, you can use or omit the parentheses, as you like. If the first letter of the string expression is lowercase, the function will do nothing.
The following simple example shows you how to convert the first character of a string in lowercase, using the Perl lcfirst function: