View Single Post
Old 08-13-2002, 03:19 PM   PM User | #3
amy2go
New Coder

 
Join Date: Jun 2002
Location: Dallas
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
amy2go is an unknown quantity at this point
I would put your html inside your perl script like this:

print <<"HTML";

<html>
<head>
<body>
</body>
</html>

HTML

Remember that this is very picky...there should be no space between the << and the "HTML", and the HTML marker should be unquoted and at the beginning of an empty line; no other code is allowed on this line, including the end-of-file marker and semi-colon. If it is on the last line of your program, there must be a carriage return. (Be sure to include the content-type). What this does is interpolates the perl variables used as if the entire section was in double quotes. So you can have <td>$perlVariable</td>. You can use this over and over:

#perl script

print <<"HTML";

html stuff

HTML

#perl script

print <<"HTML";

html stuff

HTML
__________________
Some days you are the bug; some days you are the windshield.
amy2go is offline   Reply With Quote