Perl q/STRING/ Function

singly quote a string.

q is rather an operator than a function. You can use it instead of single quotes. Because it returns a single quoted string, the interpolation is not allowed. Instead of slashes you can use any set of delimiters you want. If you use parentheses as delimiters, its syntax looks like a function, where string is the argument:

Single quotes are used to enclose data you want taken literally. See the following example:
use strict;
use warnings;
my $str = 'The pencil is mine.';
print "$str\n";
# the same thing:
$str = q/The pencil is mine./;
print "$str\n";
The output:
The pencil is mine.
The pencil is mine.