I'm using Perl to generate dynamic WML, however, I'm not able to pass variables between different subroutines.

This is part of the code in one of the subroutines:

print <<END_of_wml;
Content-type: text/vnd.wap.wml
...
<center>
<p>Please enter a course code:</p>
<input name="course_code" size="9"/><br/>
<anchor>Submit<br/>
<go href="wml.cgi" method="post">
<postfield name="action" value="check_course"/>
<postfield name="abc" value="$course_code"/>
</go>
</anchor>
...

In another subroutine, I tried to display $abc:

print <<END_of_wml;
Content-type: text/vnd.wap.wml
...
<wml>
<card id="test" title="check">
abc = $abc
</card>
</wml>
END_of_wml

The the content of $abc is blank. I also tried \$abc, but still...

What did I do wrong?

oli