Perl | quotemeta() Function Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report quotemeta() function in Perl escapes all meta-characters in the value passed to it as parameter. Example: Input : "GF*..G" Output : "GF\*\.\.G" Syntax: quotemeta(value) Parameter: value: String containing meta-characters Return: a string with all meta-characters escaped Example 1: Perl #!/usr/bin/perl -w $string = "GF*\n[.]*G"; print "Original String: \n"; print $string; # Applying operation on the String print "\n\nString after operation: \n"; print quotemeta($string); Output: Original String: GF* [.]*G String after operation: GF\*\ \[\.\]\*G Example 2: Perl #!/usr/bin/perl -w $string = "GF+n\{.}/G"; print "Original String: \n"; print $string; # Applying operation on the String print "\n\nString after operation: \n"; print quotemeta($string); Output: Original String: GF+n{.}/G String after operation: GF\+n\{\.\}\/G Comment More infoAdvertise with us Next Article Perl | sqrt() Function C Code_Mech Follow Improve Article Tags : Perl Perl-function Perl-String-Functions Similar Reads 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 | prototype() Function prototype() function in Perl returns a string containing the prototype of the function or reference passed to it as an argument, or undef if the function has no prototype. Syntax: prototype(function_name) Parameter: function_name: Function whose prototype is to be determined Returns: prototype of th 1 min read Perl | prototype() Function prototype() function in Perl returns a string containing the prototype of the function or reference passed to it as an argument, or undef if the function has no prototype. Syntax: prototype(function_name) Parameter: function_name: Function whose prototype is to be determined Returns: prototype of th 1 min read Perl | sprintf() Function sprintf() function in Perl uses Format provided by the user to return the formatted string with the use of the values in the list. This function is identical to printf but it returns the formatted string instead of printing it. Syntax: sprintf Format, List Returns: a formatted scalar string Example 1 min read Perl | sprintf() Function sprintf() function in Perl uses Format provided by the user to return the formatted string with the use of the values in the list. This function is identical to printf but it returns the formatted string instead of printing it. Syntax: sprintf Format, List Returns: a formatted scalar string Example 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 Like