web surfer sends request for as page
HTTP server looks at the request and if it involves external program, then invokes external perl program which is in some dir on the web server. Passes request parameters to this program
Perl program is executed and sends the result back to the request