Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: quotes in Perl

by bobf (Monsignor)
on Oct 21, 2004 at 21:10 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://401306]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found