Tutorials Point


  Perl Home

  PERL Functions

© 2013 TutorialsPoint.COM


  Home     References     About TP     Advertising  

PERL q() Function



Advertisements

Syntax

q ( string )


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

  • A single-quoted string.

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


Advertisements


  

Advertisements