Jason,
Some things you can try...

(a) use a style sheet.. (.css file) and use that to set font and background color 
properties. This is obviously a non-Perl solution.

(b) put these variables into a configuration file, and have each of your files read 
that configuration file..
config file would contain,
FONT_COLOR=000000
BACKGROUND_COLOR=555555


then the code would read it into a hash,
open(CONFIG,"myconf.file") or die "Can't open config";
my %colors;
while(<CONFIG>) { 
        chomp; 
        my @values = split('=',$_); 
        $colors{$values[0]} = $values[1];
}

and then use the variables in each of your files...
ie: $colors{'TEXT_COLOR'} and so on...

(c) just have a separate file called variables.pl (or whatever you want),
define the variables you want inside it...
$font_color = "#000000";

and then in each of the other source files, pull the variables.pl file in with a 
require..
require 'variables.pl';

BTW, the third method is how you would define global variables in Perl, I 
believe.. 
Pick whichever works for you :o), I'd personally prefer either the style sheet or 
configuration file approach... 

Hope this helps..
Thimal

>  I think that I need to be using global variables.  Unless Someone has a> 
> better solution.
>  
>  What I am trying to do is.  I want to set a variable for such things as  
>  
>  FONT_COLOR=000000
>  BACKGROUND_COLOR=555555
>  
>  
>  For example:  So that I do not have to go through every file and set that
>  on
>  ever line that I would like to use it on.  I would like to set global
>  variable so that if I change (in this case) the colors than I only have to
>  change it in one place and be done with it.
>  
>  Which brings me to my question. Unless you know a better way of doing it.
>  How do I set global variables????????????
> 
>  
>  Jason


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to