in reply to HTTP within an application

Maybe HTTP::Daemon might be interesting for you. Or, if you need a real webserver, use POE. You can find some samples on http://poe.perl.org/?POE_Cookbook:

Maybe, even mod_perl might be interesting for you

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"