package mywebpages; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(servePage isPageValid); require 5.003; use strict; use CGI qw(:standard escapeHTML); ################ # commonHeader # ################ # Description: produces html header common to all pages # INPUT: webpage name (ex. = home.html) # OUPUT: scalar reference containing html header sub commonHeader($) { my ($page) = @_; my $html_string; $html_string = header("text/html"). start_html(-meta=>{"Content-Type" => "text/html", "charset" => "iso-8859-1"}, -title=>"$page", -bgcolor=>"white"). p. h1("myWebSite"). hr. p("The 'current' time according to this system is: "). b($timestamp); return (\$html_string); }