sub request_handler{ my ($r) = @_; my $args = $r->args(); my $hostname = $r->hostname(); $cgi = new CGI; $cgi->charset('UTF-8'); my $pjx = CGI::Ajax->new( 'myFunc' => $get_response ); $pjx->js_encode_function('encodeURIComponent'); my $html = $pjx->build_html( $cgi, $show_html, {'-charset' => 'UTF-8' , '-Cache-Control' => 'no-cache, must-revalidate'} ); $r->print($html ); return OK; }