in reply to setting envirnment variables from array.

Your best bet is probably to just put them in a hash.

my %config; ... $config{ $var } = $value; }

Then you can access your variables like this:

$i_want_the_value_of_port = $config{ 'port' };

-Bryan