you simply pass your variables to your external cgi through a regular form post. Or you can use a header !
print "<form action='http://www.thedomain.com/your.cgi' method='post><BR>
<INPUT NAME=name TYPE=text VALUE=''><BR>
<INPUT TYPE='submit' VALUE='Continue' NAME='submit'></form>";
Through a header:
$link="http://www.thedomain.com/your.cgi";
$name=Peter;
$address="2 any street";
Header("Location: $link?name=$name&address=$address");
Peter