in reply to Perl script to handle requests to a http://.../path/*

You might want to look into mod_rewrite for apache. It will do what you want and more. It's pretty neat -- you can transparently apply regular expressions to urls to rewrite them to whatever you want. So you could, for example, match /thedirectory/(.*) and rewrite it as some.cgi?blah=$1. The user sees a pretty url, and you get to use an arbitrary CGI. Very handy.