my $test="my_variable_name"; # I pulled this from the db. I have no idea what it actually is, plus I need to be able to support arbitrary additions to the db anyway my $default_value="the value I set"; $$test = $default_value;