Maybe I'm just confused, but I think you're basically there. Just move your form to another display function..
#!/usr/bin/perl
use CGI;
print $q->header();
%formvals = $q->Vars();
my $repaccess = $formvals{cvsrep};
my $repfunction = $formvals{function};
if($repfunction =~ /Register_User/) {<br>
print $logo;
&displayreg($repaccess);
} elsif ($repfunction =~ /Delete_User/) {
print $logo;
&displaydel($repaccess);
} elsif ($repfunction =~ /Show_All_Users/) {
printf $logo;
&showallusers($repaccess);
} elsif ($repfunction =~ /Reset_Password/) {
printf $logo;
&displayreset($repaccess);
} else {
displayform();
}
sub displayform{
printf "<h1>CVS User Management</h1><br>";
printf "<P>";
printf "<b>Please select which cvs repository your would like to adm
+inister.</b><br><br>";
foreach my $rep (<@reps>) {
printf $q->radio_group (-name => 'cvsrep',<nt>
-values => [$rep],
-linebreak => 'true');
}
printf "<br>";
printf "<b>Please select the function to use. <br></b><br>";
my @functions = ('Register_User','Delete_User','Show_All_Users','Res
+et_Password');
foreach my $func (<@functions>) {
printf $q->checkbox_group (-name => 'function',<br>
-values => [$func],
-linebreak <br>=> 'true',
-defaults => 'other');
}
print "<br>";
print $q->reset;
print $q->submit ('Submit', 'Submit');
print $q->endform;
}
sub displayreg { ... }