#!/usr/bin/perl -w use strict; use CGI qw(param); my $head = "Content-type: text/html\n\n"; $head .= "\n"; my $foot = "\n"; if (defined param("page")) { if (param("page") eq "top") { page_top(); exit; } elsif (param("page") eq "bottom") { page_bottom(); exit; } } else { page_main(); } sub page_main { print < $foot MAIN } sub page_top { print <TOP OF THE PAGE $foot TOP } sub page_bottom { print <THIS IS THE BOTTOM $foot BOTTOM