
mhx
Enthusiast
/ Moderator
Jun 21, 2001, 8:51 PM
Post #2 of 2
(597 views)
|
Hi! Check this out, it's called heredocs:
print <<'END'; <BODY BGCOLOR="#FFFF00" TEXT="#FF0000" LINK="#0000FF" VLINK="#FF00FF"> END
You have to assure that there are no extra whitespaces before the terminating END. This solution is best suited if you have long text. For short text (like this one) you can also use the quoting operator qq:
print qq(<BODY BGCOLOR="#FFFF00" TEXT="#FF0000" LINK="#0000FF" VLINK="#FF00FF">\n); There's another solution, but it's full of backslashes:
print "<BODY BGCOLOR=\"#FFFF00\" TEXT=\"#FF0000\" LINK=\"#0000FF\" VLINK=\"#FF00FF\">\n"; Anyway, if your script should output HTML, you should think of using the CGI modules. If you don't know them, type perldoc CGI at your shell / command prompt. Hope this helps. -- Marcus
|