|Home » Howtos » Syntax » Here document| If you're tempted to
write multi-line output with multiple statements, because that's
what you're used to in some other language, consider using a
HERE-document instead. Inspired by the here-documents in the
Unix command line shells, Perl HERE-documents provide a
convenient way to handle the quoting of multi-line values. So
you can replace this: print "Welcome to the MCG Carpark.\n";
print "\n"; print "There are currently 2,506 parking spaces
available.\n"; print "Please drive up to a booth and collect a
ticket.\n"; print <<'EOT'; Welcome to the MCG Carpark. There are
currently 2,506 parking spaces available. Please drive up to a
booth and collect a ticket. EOT EOT in this example is an
arbitrary string that you provide to indicate the start and end
of the text being quoted. The terminating string must appear on
a line by itself. The usual Perl quoting conventions apply, so
if you want to interpolate variables in a here-document, use
double quotes around your chosen te