[EMAIL PROTECTED] wrote:
> 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?
You should be getting an error like:
Can't find string terminator "" anywhere before EOF at ./foo.pl
line nnn.
because your statement is being evaluated as
print <<"";
(and head is being taken as a bareword) which is half-way clear
from the error given above, and would surely be clear if you were
using the -w switch. If you really want to end on " head", go
ahead and do that; or end on "head" and remove the leading spaces
later on.
One moral of this story is that the -w switch alerts you very
quickly to a great many problems. Somebody once said it is a bug
that the -w switch isn't mandatory (cf. man perl).
Christian
__________________________________________________________________
117 NW 15th Street # S107 [EMAIL PROTECTED]
Gainesville, FL 32603-1973 (352) 392-0851