my $string = ""; foreach ($HTTP_POST_VARS as $key=>$val){ $string .= " $key=$val"; } system("perl test.cgi $string");