Perl functions references-q Function - Perl Scripting

What is the q function?

Description

This function is used instead of single quotes. This is not really a function, more like an operator, but you'll probably look here if you see it in another programmer's program without remembering what it is. You can actually use any set of delimiters, not just the parentheses.

Syntax

Following is the simple syntax for this function −

Return Value

This function returns a single-quoted string.

Example

Following is the example code showing its basic usage −

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Perl Scripting Topics