初学者的问题

初学者的问题

初学者的问题
我是一个初学者,照着书抄了一个PERL的程序,调试总是通不过,报undefined subroutine &main::html_header called at hello.pl line 10错,代码编辑器是用perl express2.4,三个程序,hello.pl是主程序,另外2个是子程序,源程序如下:
[b]hello.pl[/b]
#!c:\perl\bin\perl.exe
require "htmlstart.pl";
# print "Content-type: text/html\n\n";
# print "<html>","\n";
# print "<head><title>quiz form</title></head>","\n";
print "<body>","\n";
print "<h1>quiz form</h1>";
print "</body>";
print "</html>";
&html_header;
#require "htmlend.pl";
# &html_footer;
#end
[b]htmlend.pl[/b]
#!c:\perl\bin\perl.exe
sub html_footer
{
print "\n","</body>","\n";
print "</html>\n";
}
[b]htmlstart.pl[/b]
#!c:\perl\bin\perl.exe
sub html_header
{
print "Content-type: text/html\n\n";
print "<html>","\n\n";
print "<head><title>quiz form</title></head>","\n\n";
}
请高手指点下错误,谢谢
函数未定义?
函数html_header()未定义?
你应该把&html_header;放在print "<body>","\n";前面
为什么不用CGI.pm[CCB]10[/CCB]