Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: quotes in Perl

by bobf (Monsignor)
on Oct 21, 2004 at 21:10 UTC ( #401306=note: print w/ replies, xml ) Need Help??

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
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-07-05 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls