Maybe you should check for
Apache::SSI or, as you don't use mod_perl,
CGI::SSI. I didn't get as far to look at
CGI::SSI code but i suppose it gets the file you want to include via LWP and then include it in your page. I think that's not really optimized but will do the work.
gkinueliileunikg