#mod_perl test LoadModule perl_module /usr/local/libexec/apache22/mod_perl.so #there should be better way than this... unshift @INC, '/usr/local/www/apache22/cgi-bin/test-modperl'; PerlModule test1::sample SetHandler perl-script PerlHandler test1::sample #### package test1::sample; use strict; use warnings; #old use Apache::Constants qw(OK); use Apache2::Const qw(OK); use Apache2::RequestRec(); use Apache2::RequestIO(); sub handler { my $r=shift; #old $r->send_http_header("text/plain"); $r->content_type("text/plain"); my $a=<print($a); return OK; } 1;