I have a variable currentUser in a sub routine. It carries through to one subroutine, but does not carry through to another subroutine. How can I pass a variable through multiple subroutines while keeping the value?
sub login {
&app_header;
print <<EOF;
<form name="macform" method="POST" enctype="application/x-www-form-urlencoded" action="$fullurl">
...stuff
EOF
}
sub html_menu {
$me = $currentUser;
print $me;
print <<EOF;
<form name="menuform" method="POST" enctype="application/x-www-form-urlencoded" action="$fullurl">
..stuff
EOF
&app_list_button;
print "<br>";
&app_search_button;
print "<br>";
&app_edit_button;
print "</div>";
}
When I attempt to do the same thing the html_form sub does with currentUser in a new sub called after html_form), the variable does not display as what the user entered during login.