解决方法
使用
HTML::Mason:
<%perl> use Date::Calc; my @today = Date::Calc->Today(); my $str = "$today[0]-$today[1]-$today[2]"; </%perl> <html> <body> Today is <%$str %> </body></html>
Apache配置:
PerlModule HTML::Mason::ApacheHandler <Location /usr/local/apache/htdocs/mason> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </Location>