Help for this page

Select Code to Download


  1. or download this
        print <<  "ENDTAG"; # works
        print <<  'ENDTAG'; # works
        print <<   ENDTAG;  # syntax error!
    
  2. or download this
    print "printing here doc:\n";
    print <<"ENDTAG";
    ...
    printing here doc:
    This text has 0 leading spaces
        This text has 4 leading spaces
    
  3. or download this
    {
        print "printing here doc:\n";
    ...
        This text has 4 leading spaces
    ENDTAG
    }
    
  4. or download this
    {
        print "printing here doc:\n";
    ...
    OUTPUT:
    printing here doc:
        This text has 4 leading spaces