> sub header {
> print << head;
> Content-type: text/html\n\n
> <html>
> <head><title>Control Panel</title></head>
> <body bgcolor=white>
> head
> }
As dumb as this sounds, you can't have the 'head'
at the end indented. Well, not without some extra
stuff.
If you run
perldoc perldata
You'll find:
If you want your here-docs to be indented with the rest of
the code, you'll need to remove leading whitespace from
each line manually:
($quote = <<'FINIS') =~ s/^\s+//gm;
The Road goes ever on and on,
down from the door where it began.
FINIS
(There's more tricks from that dept., but I won't
go into that here. Iirc, 5.6 added something to
make this a little better, but I don't recall what.)