interpolation with with double quote : 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 
interpolation with with double quote
     

    $print = 10;    
    $line = "this is $print";   

   
    
    
    
    
  
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 5 Quotation Marks
18.Perl's Alternative Quotes
19.Print with double vs. single quotes
20.Printing without Quotes: The here document
21.Properties of printing with single quotes
22.Put double quote into single quote
23.Put qotation marks in q function
24.Put single quote into double quote
25.Quote Operators
26.Quote with qq# (number sign)
27.Quote with qq< (less than)
28.Quote with qq( (parenthesis)
29.Quote with qq| (bar)
30.Single quote string
31.Single quote with windows file path
32.Single quotes do not interpret
33.Single quotes interpret
34.The difference between single and double quotes
35.The qq operator does the same for double-quoted strings
36.Using alternative quotes
37.Using backslash for double quote
38.Using qq for quote
39.Using qw to assign value to scalar
40.Using qw to create string array without quotation marks
41.When a string is enclosed in double quotes, scalar variables and arrays are interpolated.
42.You can change the delimiters with the q operator
43.\n with double quotation
44.$statement = q/print "Hello.";/;
45.$statement = qq/print "Hello.";/;
46.qx command
47.All Perl math operations are performed on double-precision floating-point values.
48.assigns a single 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.