Perl | lcfirst() Function Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report lcfirst() function in Perl returns the string VAR or $_ after converting the First character to lowercase. Syntax: lcfirst(VAR) Parameter: VAR: Sentence whose first character is to be converted to lower case Returns: the string VAR or $_ with the first character lowercased Example 1: Perl #!/usr/bin/perl # Original String containing both # lower and upper case letters $orignal_string = "GEEkS FoR geEkS"; # Converting the First character to Lower case $changed_string = lcfirst($orignal_string); # Printing the original String print "Original String : $orignal_string\n"; # Printing the Changed String print "Changed String : $changed_string\n"; Output: Original String : GEEkS FoR geEkS Changed String : gEEkS FoR geEkS Example 2: Perl #!/usr/bin/perl # Original String containing # lower and upper case letters # as well as numerics $orignal_string = "G33kS F0R g3EkS"; # Converting the first character to Lower case $changed_string = lcfirst($orignal_string); # Printing the original String print "Original String : $orignal_string\n"; # Printing the Changed String print "Changed String : $changed_string\n"; Output: Original String : G33kS F0R g3EkS Changed String : g33kS F0R g3EkS Comment More infoAdvertise with us Next Article Perl | Useful String functions C Code_Mech Follow Improve Article Tags : Perl Perl-function Perl-String-Functions Similar Reads Perl | Useful String functions A string in Perl is a scalar variable and start with a ($) sign and it can contain alphabets, numbers, special characters. The string can consist of a single word, a group of words or a multi-line paragraph. The String is defined by the user within a single quote (â) or double quote (â). Perl provid 3 min read Perl | lc() Function for Lower Case Conversion lc() function in Perl returns a lowercased version of VAR, or $_ if VAR is omitted. Syntax: lc(VAR)Parameter: VAR: Sentence which is to be converted to lower caseReturn: Lowercased version of VAR, or $_ if VAR is omitted Example 1: Perl #!/usr/bin/perl # Original String containing both # lower and u 1 min read Perl | String functions (length, lc, uc, index, rindex) String in Perl is a sequence of character enclosed within some kinds of quotation marks. Perl string can contain UNICODE, ASCII and escape sequence characters. Perl provides the various function to manipulate the string like any other programming language. Some string functions of Perl are as follow 4 min read Perl | y Operator The y operator in Perl translates all characters of SearchList into the corresponding characters of ReplacementList. Here the SearchList is the given input characters which are to be converted into the corresponding characters given in the ReplacementList. Syntax: y/SearchList/ReplacementList/ Retur 2 min read lcm() in C++ 17 The lcm() is a built-in function introduced in C++17. It is used to calculate the least common multiple (LCM) of two integers. The LCM of two integers is the smallest positive integer that is divisible by both numbers.Letâs take a look at an example that illustrates the lcm() function:C++#include 2 min read LCM Calculator LCM Calculator is an online browser-based tool that helps users quickly find the of a set of numbers. In this calculator, users input the numbers they want to find the LCM for, and the calculator provides the result, saving time and effort compared to manual calculations.How to Use LCM Calculator?To 3 min read Like