Easy solution for you, I had this same problem,
You can pass with form input and you can pass with a hyperlink
To pass default data just use ?$variable and then pick up in the environmental variable in script b
Couple easy ways to do this
Form Method
print "<FORM ACTION=add2.cgi?$user METHOD=POST>";
In this example I am sending the form data and also the $user variable to another script.MAKE SURE YOU DONT PUT QUOTES AROUND ANYTHING INBETWEEN THE < > OR YOU WILL GET AN ERROR
Hyperlink Method
print "<A HREF='add.cgi?$user'>YES</A>";
iN THIS EXAMPLE WHEN THE PERSON CLICKS ON THE YES LINK, IT SEND THE $USER VARIABLE TO THE NEXT SCRIPT
Next, how to retrieve this data in the next script. It is stored in an enviromental variable named "Query String"
#Script B
$variable =$ENV{'QUERY_STRING'};
Voila, your variable you passed from script A, is stored in the enviromental variable Query String which you then pick up in the next script and assign to another variable for use.