my $q = new CGI; my %conf = ... hash defined elsewhere for ( $q->param() ) { $conf{$_} = $q->param($_); }