Perl | uc() Function Last Updated : 07 May, 2019 Comments Improve Suggest changes Like Article Like Report uc() function in Perl returns the string passed to it after converting it into uppercase. It is similar to ucfirst() function which returns only first character in uppercase. Note: The characters which are already in UpperCase are not modified. Syntax: uc String Returns: string in uppercase. Example 1: Perl #!/usr/bin/perl -w # String to be converted to UPPERCASE $string = "geeksfOrGeeks"; print "Original String: $string\n"; # Converting the string to # UPPERCASE using uc() function $UPPER_STRING = uc($string); print "Modified String: $UPPER_STRING"; Output: Original String: geeksfOrGeeks Modified String: GEEKSFORGEEKS Example 2: Perl #!/usr/bin/perl -w # String to be converted to UPPERCASE $string = "WelComEToGeeKS"; print "Original String: $string\n"; # Converting the string to # UPPERCASE using uc() function $UPPER_STRING = uc($string); print "Modified String: $UPPER_STRING"; Output: Original String: WelComEToGeeKS Modified String: WELCOMETOGEEKS Comment More infoAdvertise with us Next Article Perl | uc() Function C Code_Mech Follow Improve Article Tags : Perl Perl-function Perl-String-Functions Similar Reads Perl | sin() Function This function is used to calculate sine of a VALUE or $_ if VALUE is omitted. This function always returns a floating point. Syntax: sin(VALUE) Parameters: VALUE in the form of float Returns: Function returns sine of VALUE. Example 1: Perl #!/usr/bin/perl # Calling sin() function $var = sin(5); # Pr 1 min read Perl | return() Function return() function in Perl returns Value at the end of a subroutine, block, or do function. Returned value might be scalar, array, or a hash according to the selected context. Syntax: return Value Returns: a List in Scalar Context Note: If no value is passed to the return function then it returns an 2 min read Perl | sqrt() Function Many times it happens that while solving mathematical expressions we require to calculate the square root of a number. To solve this issue, like other programming language Perl provides us with a built-in function sqrt() which can be used to calculate the square root of a number. Syntax: sqrt value 1 min read Perl | ord() Function The ord() function is an inbuilt function in Perl that returns the ASCII value of the first character of a string. This function takes a character string as a parameter and returns the ASCII value of the first character of this string. Syntax: ord string Parameter: This function accepts a single par 1 min read Perl | chr() Function The chr() function in Perl returns a string representing a character whose Unicode code point is an integer. Syntax: chr(Num)Parameters: Num : It is an unicode integer value whose corresponding character is returned .Returns: a string representing a character whose Unicode code point is an integer. 1 min read Like