first script: my %hash; #get stuff from MySQL my $param_value .= "$_ = $hash{$_}&" for keys %hash; chop $param_value; $q->redirect(-uri=>"http://blah.com/cgi-bin/blah.cgi?$param_value"); second script: %fields = (row1=>"", row2=>"", row3=>"", row4=>""); #where row1..4 = keys from %hash in first script $field{$_} = $cgi->param($_) for %fields; #or %fields = $cgi->Vars;