http://qs321.pair.com?node_id=243111


in reply to Using a template

Greetings shanestyle,

Simple answer: You could require your settings file from your Perl CGI script. First, create a settings.pl file. Insert into that file whatever settings, subs, whatever that are shared by your various CGI scripts. Then require settings.pl; from each of your CGI scripts. require is not exactly the same as use, so read a bit in the docs about require for additional info.

Better answer: Take a look at HTML::Template. It sounds like your situation may be really helped by that. Without knowing more specifics about your situation, I can't answer more directly. However, I can tell you that after having adopted HTML::Template, I can't code any other way.

gryphon
code('Perl') || die;