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

Re: here-document without interpolation (<<DELIMITER;)

by Coruscate (Sexton)
on Jan 16, 2004 at 00:35 UTC ( [id://321743]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to here-document without interpolation (<<DELIMITER;)

Heredocs allow you to use a single blank line as your end delimeter if you wish. This means that rather than writing

print <<"Done"; foo bar baz Done print "aha!\n";

, you can write

print <<""; foo bar baz print "aha!\n";

(note the lack of anything but a blank line between "baz" and the following print statement). It was previously allowed to use

print <<; foo bar baz print "aha!\n";

(note the plain and simple "print <<;" line). You can still use that simple version, but it's best not to as there is no guarantee that such functionality will be reserved in future perl versions (and that is why the warnings pragma will cough up that deprecated message if you use "print <<;").

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://321743]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.