user7183174 user7183174 - 3 months ago 54
Perl Question

perl parsing cgi parameters

I remember reading somewhere that it's possible to pass arguments to a perl cgi script as such:

I don't remember where I read it and searching didn't help me, so can anybody tell me if this actually works and if yes, how? Is this a mod_perl thing?


Yes. If a CGI script is called from a URL of the form:

then the path /foo/bar will be available in the environment variable PATH_INFO.

If you're using, this is also available in $q->path_info. If you're using mod_perl, Apache2::RequestRec has the same method.