At 16:42 2001.06.03, you wrote:
>hello all-
>quick question that is definitely from a neophyte.
>
>i am currently using:
>
>sub begin {
> print "Content-type: text/html\n\n";
> print "<html>\n";
> print "<head><title>Control Panel</title></head>\n";
> print "<body bgcolor=white>\n";
>}
>
>sub footer {
> print "</body>\n";
> print "</html>\n";
>}
>
>
>within my code. it works like a charm. however, when i try:
>
>sub header {
> print << head;
> Content-type: text/html\n\n
> <html>
> <head><title>Control Panel</title></head>
> <body bgcolor=white>
> head
>}
>
>
>is this not working because of a fault in my syntax? or is this not
>possible within perl?
It doesn't work because your "head" marker for the end of your << expression is not at
the start of the line.
Try this instead:
sub header {
print << head;
Content-type: text/html\n\n
<html>
<head><title>Control Panel</title></head>
<body bgcolor=white>
head
}
It should work. Note that when using the << expression, the text is sent as is, with
the leading spaces. You might want to remove these to generate cutter HTML code.
best
>thanks! -charles
-----------------------------------------------------------
Éric Beaudoin <mailto:[EMAIL PROTECTED]>