# totally techinally incorrect code but # this what I want to acheive my $pjx = new CGI::Ajax( 'exported_func' => \&perl_func); print $pjx->build_html( $cgi, \&Show_HTML); sub perl_func { my $input = shift; my $varHtml = "second_file.html"; return $varHtml.responseText; }