rich731 has asked for the wisdom of the Perl Monks concerning the following question:
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 "<br>"; } 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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing a variable to a module
by JavaFan (Canon) on Oct 31, 2008 at 01:35 UTC | |
by ikegami (Patriarch) on Oct 31, 2008 at 03:34 UTC | |
by rich731 (Beadle) on Oct 31, 2008 at 10:54 UTC |