in reply to Re: Re: using strict and a config file
in thread using strict and a config file

Hi,
I have a similar setup and the way I work is fully qualifing the variable using the package name. This will prevent strict from complaining. For Example: The config_mail file
Package MailConfig; use strict; @MailConfig::fields=qw /to from subject message/;
etc... And in your actual program, do:
use strict; require "config_mail.pl"; ...your print code... <tr> <td>From:</td> <td><select name='$MailConfig::fields[1]" size="1"> more code... </select></td> </tr> <tr> <td>Subject:</td> <td><input type="text" name="$MailConfig::fields[2]" size="24"></t +d>
This is the most readable solution, as you know where to look for when you want to change a variable.
Dr. Mark Ceulemans

Senior Consultant

IT Masters, Belgium

Replies are listed 'Best First'.
Re (tilly) 4: using strict and a config file
by tilly (Archbishop) on Nov 12, 2001 at 14:30 UTC
    Glancing at your print code strongly suggests to me that you have a lot to learn about separation of presentation and content.

    A good first link I would therefore recommend is the following paper on how to use the template toolkit in building web sites.