$dbh = CWT::Site_DB::connect(); $sth = $dbh->prepare (qq{ SELECT * FROM config_settings }); $sth->execute(); while (my %settings = %{$sth->fetchrow_hashref};) { my $varname = "$" . $settings{name}; eval "$varname = '$settings{value}'" or die "problem with eval"; } $sth->finish();