A HERE Document is a Perl idea which is also used in PHP4+ and basically what it allows you to do is create a long string without having to worry about escaping it. Perl will not process anything in between the starting word and its matching ending word (they can be whatever you want as long as they are the same).
In Perl there must not be a space between the second left-angle bracket and the starting word, and the starting word must be followed immediately by a semicolon. The ending word must appear on a line by itself with no whitespace on either side -- except for a required newline immediately following it -- and no semicolon:
code:
$extra_javascript = <<HERE;
<div class="myClass">Normal strings would require that the quotes (")
or apostrophes (') would need escaping which in a long string would
be time consuming so we use a HERE document.</div>
HERE
PHP does things slightly differently (3 <, and the semicolon is move to the last line of the HERE):
code:
$extra_javascript = <<< HERE
<div class="myClass">Normal strings would require that the quotes (")
or apostrophes (') would need escaping which in a long string would
be time consuming so we use a HERE document.</div>
HERE;