Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

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

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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2021-02-26 15:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found