|The stupid question is the question not asked|
Re: Global includes in cgi'sby andreychek (Parson)
|on Jun 09, 2001 at 22:46 UTC||Need Help??|
The mod_perl guide has an excellent tutorial on writting configuration files.
Although it's referring to mod_perl, I don't see any reason why it wouldn't also work under ordinary CGI.
In short, the mod_perl guide offers this code:
Again, that code is verbatim out of the mod_perl guide, and I included a link to it above. While you could directly use this code, I highly recommend reading the entire section in the guide regarding configuration files so you can decide if this is the best method for you or not. It contains a lot of good information, and is very well written.
If you don't like the idea of using actual Perl code in your config file, there are modules at CPAN that allow you to write config files in other formats. Check out Config::IniFiles, XML::Simple, and Config::General.