in reply to Creating new variables from the value of other variables
Now you have all of your 'variables' and their values stored in one convient location a hash. Try this just after the close:use strict; #dammit! my %hash; open(CONF," conf.file") || die 'didn't open for reading'; while(<CONF>) { my ($name,$data) = split; # look ma, no args! $hash{$name} = $data; } close CONF;
Later in your code, when you need to access one of the config variables, say 'foo', you do so like this: $hash{foo}use Data::Dumper; print Dumper %hash;
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|