package htmlCode2; use CGI; use DBI; #Create new CGI object my $cgi = new CGI; sub new { my $class = shift; return bless {}, $class; } sub htmlHead { my $title = shift; print $cgi->header("text/html"); print $title; print "
"; } 1; #### #!/usr/bin/perl -w use strict; use CGI qw(:standard escape escapeHTML); use DBI; use htmlCode2; use CGI::Carp qw(fatalsToBrowser); #Create new CGI object my $cgi = new CGI; #Create new htmlCode object my $htmlCode = new htmlCode2; $htmlCode->htmlHead("Title Test"); print "Test Text";