note
cjf
<p>I use [Here docs] for anything small and [http://www.perl.com/pub/a/2001/08/21/templating.html|templating systems] for anything serious. I won't open up the CGI.pm shouldn't contain HTML generation code debate again (try a [CGI.pm HTML Generation|search] if you're interested).</p>
<p><b>Update:</b> As for making heredocs look better in your code, indenting really helps:</p>
<code>
my $text = "Hello, World!";
print <<" EOF";
<html>
<head>
<title>Example</title>
</head>
<body>
<p>$text</p>
</body>
</html>
EOF
</code>
<p>Just make sure to quote the proper amount of white space before the EOF marker (also use double quotes unless you don't want variable interpolation).</p>
185071
185071