Help for this page

Select Code to Download


  1. or download this
    print "<html>
    <body>
    ...
    </body>
    </html>
    ";
    
  2. or download this
    print "<h1 align=\"right\">Hello World</h1>";
    
  3. or download this
    print '<h1 align="right">Hello World</h1>';
    
  4. or download this
    print '<html>
    <body>
    ...
    </body>
    </html>
    ';
    
  5. or download this
    my $string = 'Hello World';
    print '<h1 align="right">' . $string . '</h1>' . "\n";
    
  6. or download this
    my $string = 'Hello World';
    print "<h1 align=\"right\">$string</h1>\n";
    
  7. or download this
    print qq(<h1 align="right">$string</h1>\n);
    
  8. or download this
    print qq(<h1 align="right">$string</h1>\n);
    print qq{<h1 align="right">$string</h1>\n};
    ...
    
    # have to escape the delimiter:
    print qq/<h1 align="right">$string<\/h1>\n/;
    
  9. or download this
    my $string = 'Hello World';
    print <<HTML;
    ...
    </body>
    </html>
    HTML