line are available as a file object: PACKAGE::DATA in Perl (e.g., main::DATA) and DATA in Ruby. As an inline file, these are semantically similar to here documents, though there can be only one per script. However, in these languages the term "here document" instead refers to multiline string literals, as discussed below. Data URI Scheme As further explained in Data URI scheme, all major web browsers understand URIs that start with data: as here document. Multiline string literals The term "here document" or "here string" is also used for multiline string literals in various programming languages, notably Perl (syntax influenced by Unix shell), and languages influenced by Perl, notably PHP and Ruby. The shell-style << syntax is often retained, despite not being used for input redirection. Perl-influenced Perl In Perl there are several different ways to invoke here docs. The delimiters around the tag have the same effect within the here doc as they would in a regular string literal: For example, using double quotes around the tag allows variables to be interpolated, but using single quotes doesn't, and using the tag without either behaves like double quotes. Using backticks as the delimiters around the tag runs the contents of the heredoc as a shell script. It is necessary to make sure that the end tag is at the beginning of the line or the tag will not be recognized by the interpreter. Note that the here doc does not start at the tag—but rather starts on the next line. So the statement containing the tag continues on after the tag. Here is an example with double quotes: my $sender = "Buffy the Vampire Slayer"; my $recipient = "Spike"; print <<"END"; Dear $recipient, I wish you to leave Sunnydale and never return. Not Quite Love, $sender END Output: Dear Spike, I wish you to leave Sunnydale and never return. Not Quite Love, Buffy the Vampire Slayer Here is an example with single quotes: print <<'END'; Dear $recipient, I wish you to leave Sunnydale and never return. Not Quite Love, $sender END Output: Dear $recipient, I wish you to leave Sunnydale and never return. Not Quite Love, $sender And an example with backticks (may not be portable): my $shell_script_stdout = <<`END`; echo foo echo bar END It is possible to start multiple heredocs on the same line: say(<<BEGIN . "this is the middle\n" . <<END); This is the beginning: BEGIN And