Perl | Useful String Operators Last Updated : 21 May, 2021 Comments Improve Suggest changes Like Article Like Report 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 (“). Operators are the foundation of any programming language, so as in Perl. A user can define operators in String as symbols that help to perform specific mathematical and logical computations on operands. These operations are like concatenation, comparison, substitution, etc.Example: Perl # Perl program to demonstrate the # Concatenation Operator(.) in String #!/usr/bin/perl # Input first string $first_string = "Geeks"; # Input second string $second_string = "forGeeks"; # Implement Concatenation operator(.) $concat_string = $first_string.$second_string; # displaying concatenation string result print "String After Concatenation = $concat_string\n"; Output: String After Concatenation = GeeksforGeeks Some useful operators for String operations in Perl are listed below: OperatorDescriptionqw'quote word' operator is used to extract each element of the given string as it is in an array of elements in single-quote ( ‘ ‘ )qUsed in place of single quotes. It uses a set of parentheses to surround the stringqqUsed in place of double quotes. It uses a set of parentheses to surround the stringyTranslates all characters of SearchList into the corresponding characters of ReplacementListtrSimilar to 'y' operator it translates all characters of SearchList into the corresponding characters of ReplacementListeqUsed to check if the string to its left is stringwise equal to the string to its rightneUsed to check if the string to its left is stringwise not equal to the string to its rightleUsed to check if the string to its left is stringwise less than or equal to the string to its rightgeUsed to check if the string to its left is stringwise greater than or equal to the string to its rightltUsed to check if the string to its left is stringwise less than the string to its rightgtUsed to check if the string to its left is stringwise greater than the string to its rightcmpUsed to compare if the two strings placed left and right to this operator are equal or less than the othersubstitution operator(s)Used to substitute a text of the string with some pattern specified by the usermatching operator(m)Used to match a pattern within the given text Comment More infoAdvertise with us Next Article Perl | Useful String Operators A Abhinav96 Follow Improve Article Tags : Perl Perl-String Perl-String-Operators Similar Reads Perl | String Operators Operators are the foundation of any programming language. Thus, the functionality of Perl programming language is incomplete without the use of operators. A user can define operators as symbols that help to perform specific mathematical and logical computations on operands. String are scalar variabl 4 min read 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 | print operator print operator in Perl is used to print the values of the expressions in a List passed to it as an argument. Print operator prints whatever is passed to it as an argument whether it be a string, a number, a variable or anything. Double-quotes("") are used as a delimiter to this operator. Syntax: pri 2 min read Perl | Operators | Set - 2 Operators are the main building block of any programming language. Operators allow the programmer to perform different kinds of operations on operands. In Perl, operators symbols will be different for different kind of operands(like scalars and string). Some of the operators already discussed in Per 7 min read Perl | Operators | Set - 1 Operators are the main building block of any programming language. Operators allow the programmer to perform different kinds of operations on operands. In Perl, operators symbols will be different for different kind of operands(like scalars and string). Operators Can be categorized based upon their 12 min read Like