in reply to Template::Toolkit + CGI header

I'm not familiar with Template::Toolkit but my guess is you'll find $template->process(... prints the template for you and returns 1 on success. So when you go to print $ouput the template has already been printed.

Replies are listed 'Best First'.
Re: Re: Template::Toolkit + CGI header
by Heidegger (Hermit) on Jun 02, 2003 at 07:10 UTC
    I see. But then how to print the HTML header then? There must be a way to tell the Template::Toolkit to print the HTML header, but how to do that?

      Others have pointed out the solutions where you can either print the header before processing the template, or use the third argument to process to append the template output to the end of $output. But no-one has yet suggested perhaps the simplest solution - add the header to your template.

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg