Which works fine. Then it occurred to me, as it might to anybody, that I could just as well put the <TITLE> and <STYLE> in the template. And that would work fine too. And doubtless by the time you've read this far you've thought of three other ways I could do the same thing, and they'd all work fine too.use CGI; use HTML:Template; # .. then initialise $q and get input so we know what to do sub Send_Header { my $header_tmpl = HTML::Template->new( filename => 'header.tmpl' ); $header_tmpl->param( header => shift, to => shift, date => substr(scalar gmtime time, 0, 10), subject => shift, ); print $header_tmpl->output(); } print $q->header(); print $q->start_html( -title => $title, -style => {'src' => '../styles/main.css'}, ); Send_Header($header,$user,$subject) # rest of message goes here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Too Many Ways To Do It
by tilly (Archbishop) on Sep 19, 2001 at 16:26 UTC | |
|
Re: Too Many Ways To Do It
by stefan k (Curate) on Sep 19, 2001 at 16:20 UTC | |
|
"Get the Job Done" (GeJDo)
by dragonchild (Archbishop) on Sep 19, 2001 at 16:38 UTC | |
by thraxil (Prior) on Sep 19, 2001 at 20:19 UTC | |
by John M. Dlugosz (Monsignor) on Sep 20, 2001 at 02:18 UTC | |
|
Re: Too Many Ways To Do It
by Masem (Monsignor) on Sep 19, 2001 at 16:42 UTC | |
|
Re: Too Many Ways To Do It
by perrin (Chancellor) on Sep 19, 2001 at 19:29 UTC | |
by George_Sherston (Vicar) on Sep 19, 2001 at 19:44 UTC | |
by dragonchild (Archbishop) on Sep 19, 2001 at 21:05 UTC | |
by perrin (Chancellor) on Sep 19, 2001 at 21:39 UTC | |
|
Re: Too Many Ways To Do It
by MZSanford (Curate) on Sep 20, 2001 at 12:46 UTC |