私は次のコードを持っています
#file 1 a.pm
package a;
@Export=(test);
print "test"; #hashing this is enabling the rendering
sub test {
return 1;
}
#file 2 main cgi script test.pl
use a;
my $t = test();
print "Content-type: text/html\n\n";
print "<html>\n<body>\n<p>test= $t</p></body>\n</html>";
モジュールaで印刷行をハッシュしている間はレンダリングが有効になっていますが、printステートメントが有効になっていると、それを実行できませんか?