4 Answers
4

It is an operator, called a heredoc or here-document. Amusingly enough the reference in perldoc is not as easy to find as it should be. It is useful for being able to quote a large section of text without having to bother with escaping special variables.

A line-oriented form of quoting is
based on the shell "here-document"
syntax. Following a << you specify a
string to terminate the quoted
material, and all lines following the
current line down to the terminating
string are the value of the item. The
terminating string may be either an
identifier (a word), or some quoted
text. An unquoted identifier works
like double quotes. There may not be a
space between the << and the
identifier, unless the identifier is
explicitly quoted. (If you put a space
it will be treated as a null
identifier, which is valid, and
matches the first empty line.)

The
terminating string must appear by
itself (unquoted and with no
surrounding whitespace) on the
terminating line.

If the terminating
string is quoted, the type of quotes
used determine the treatment of the
text.

It's a here-document or heredoc. The ENDOFTEXT is just some arbitrary sequence that marks the end of it; it doesn't mean anything in itself. (I would be more inclined to use END but that's just personal taste.)

In addition to what other people said, I should note that the book Perl Best Practices recommends to avoid using bareword here-docs (e.g: "<<EOF") and instead explicitly quote every here-doc as either <<'EOF' or <<"EOF". This is because people often don't know what is the case for the bareword EOF.

The ENDOFTEXT string signifies the beginning and end of a "here-document". It is described in the official Perl documentation (search for EOF): Quote-and-Quote-like-Operators. It is an arbitrary string; the code could have used the string FOO with the same effect. It allows multi-line quoting, and in this case, variables will be interpolated.