Alternative delimiters can be used for all four of the q constructs. : Quotations « String « Perl
Alternative delimiters can be used for all four of the q constructs.
Related examples in the same category
A single q creates a single-quoted string:
Alternative Quotes: qq, q, qw, qx
Assign returning value from qw to an array
Backquotes and command substitution
Backslash Escapes in Perl
Demonstrating the qw operator
Display double quotation marks in a printed string
Double quote string
Double quote with windows file path
Escape double quote
Escape double quote in double quote
Escaping the double quote
If a string is enclosed in single quotes, it is printed literally (what you see is what you get).
Interpolate and double quote
Nested alternative quotes
Perl 5 Quotation Marks
Perl's Alternative Quotes
Print with double vs. single quotes
Printing without Quotes: The here document
Properties of printing with single quotes
Put double quote into single quote
Put qotation marks in q function
Put single quote into double quote
Quote with qq# (number sign)
Quote with qq< (less than)
Quote with qq( (parenthesis)
Quote with qq| (bar)
Single quote string
Single quote with windows file path
Single quotes do not interpret
Single quotes interpret
The difference between single and double quotes
The qq operator does the same for double-quoted strings
Using alternative quotes
Using backslash for double quote
Using qq for quote
Using qw to assign value to scalar
Using qw to create string array without quotation marks
When a string is enclosed in double quotes, scalar variables and arrays are interpolated.
You can change the delimiters with the q operator
\n with double quotation
$statement = q/print "Hello.";/;
$statement = qq/print "Hello.";/;
All Perl math operations are performed on double-precision floating-point values.
assigns a single quote
interpolation with with double quote
print qq|I said, "Hello".|;
qq function with variable interpolation
qw across more than one lines
Turn off the special effect a backslash has, and so we escape it:
Assigning a double quote by \"
Using backticks to capture program output.
`` returns the result of an shell command
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.