Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL q() Function
Syntax
Definition and Usage
q() can be 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.
Return Value
Example
Try out following example:
#!/usr/bin/perl -w
$var = 10;
print(q(This is a single quoted string without interpolation, $var));
|
It will produce following results:
This is a single quoted string without interpolation ,$var
| |
|

|
|
|