I tend to write CGI scripts in a c-ish manner, so there'll be a sub for each page-output & often some support subs, then main() comes down to an if statement on 1 parameter:
## main foo starts
my $run = param("run");
if ($run eq 'sub_1') {
sub_1;
} elsif ($run eq 'sub_2') {
sub_2;
} else {
start_page
}