Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 scrutinizing the Monastery: (18)
As of 2014-07-14 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (260 votes), past polls