1. Perl
  2. builtin functions
  3. here

lcfirst function - Converts the beginning of a string from uppercase to lowercase

You can use the lcfirst function to convert only the beginning of a string from uppercase to lowercase.

# Convert first letter from uppercase to lowercase
$ret = lcfirst $string;

lcfirst function programming example

This is a programming example of the lcfirst function.

use strict;
use warnings;

# Convert "FOO" to "fOO"
my $str = lcfirst "FOO";

print "$str\n";

Output result

fOO

Related information of lcfirst function

Related information for the lcfirst function.

Related Informatrion