my $html; if($auth->loggedIn){ $html = showSecretPage($html); } else { $html = showLoginPage(); } $s->flush(); print $s->header; print $html; print STDERR "Found end of script.\n"; 1;