Perl 5 Quotation Marks : Quotations « String « Perl

Home
Perl
1.Array
2.CGI
3.Class
4.Data Type
5.Database
6.File
7.GUI
8.Hash
9.Language Basics
10.Network
11.Regular Expression
12.Report
13.Statement
14.String
15.Subroutine
16.System Functions
17.Win32
18.XML
Perl » String » Quotations 
Perl 5 Quotation Marks
     


Quote     Meaning                               Variable Interpolation

"         Begins or ends a character string     Yes

'         Begins or ends a character string     No

`         Begins or ends a system command string    Yes

   
    
    
    
    
  
Related examples in the same category
1.A single q creates a single-quoted string:
2.Alternative Quotes: qq, q, qw, qx
3.Alternative delimiters can be used for all four of the q constructs.
4.Assign returning value from qw to an array
5.Backquotes and command substitution
6.Backslash Escapes in Perl
7.Demonstrating the qw operator
8.Display double quotation marks in a printed string
9.Double quote string
10.Double quote with windows file path
11.Escape double quote
12.Escape double quote in double quote
13.Escaping the double quote
14.If a string is enclosed in single quotes, it is printed literally (what you see is what you get).
15.Interpolate and double quote
16.Nested alternative quotes
17.Perl's Alternative Quotes
18.Print with double vs. single quotes
19.Printing without Quotes: The here document
20.Properties of printing with single quotes
21.Put double quote into single quote
22.Put qotation marks in q function
23.Put single quote into double quote
24.Quote Operators
25.Quote with qq# (number sign)
26.Quote with qq< (less than)
27.Quote with qq( (parenthesis)
28.Quote with qq| (bar)
29.Single quote string
30.Single quote with windows file path
31.Single quotes do not interpret
32.Single quotes interpret
33.The difference between single and double quotes
34.The qq operator does the same for double-quoted strings
35.Using alternative quotes
36.Using backslash for double quote
37.Using qq for quote
38.Using qw to assign value to scalar
39.Using qw to create string array without quotation marks
40.When a string is enclosed in double quotes, scalar variables and arrays are interpolated.
41.You can change the delimiters with the q operator
42.\n with double quotation
43.$statement = q/print "Hello.";/;
44.$statement = qq/print "Hello.";/;
45.qx command
46.All Perl math operations are performed on double-precision floating-point values.
47.assigns a single quote
48.interpolation with with double quote
49.print qq|I said, "Hello".|;
50.qq function with variable interpolation
51.qw across more than one lines
52.Turn off the special effect a backslash has, and so we escape it:
53.Assigning a double quote by \"
54.Alternative Delimiters
55.Using backticks to capture program output.
56.`` returns the result of an shell command
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.