package MyHandler; use Apache::Constants qw[ :standard ]; sub handler { my ($r) = @_; # Apache Request Object do_some_stuff(); # Your function(s) print "Some stuff\n"; # Your output return OK; }