Perl Newbies

  1. Perl
  2. Functions
  3. here

lcfirst function - Convert uppercase first character of string to lowercase

lcfirst function convert uppercase first character of string to lowercase.

# Convert uppercase first character of string to lowercase
$ret = lcfirst $string;

lcfirst function programing example

lcfirst function programing example.

use strict;
use warnings;

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

print "$str\n";

Output:

fOO

lcfirst function relative information

Menu