in reply to Re^2: How to parse URL in CGI.pm
in thread How to parse URL in CGI.pm

Is this safe? Can I count on it to always give me the correct URI?

Its safe in the sense that it is only data.

Since REQUEST_URI is not part CGI spec, it won't be available on every server, so its better to rely on other variables (PATH_INFO/QUERY_STRING...)

Replies are listed 'Best First'.
Re^4: How to parse URL in CGI.pm
by asafp (Novice) on Dec 06, 2010 at 14:41 UTC
    Should there be a problem using the $ENV{'QUERY_STRING'} if the program runs under mod_perl?

      The environment variable is part of the CGI interface. If your script is being provided a CGI interface, it will be present. Otherwise, it won't.

      mod_perl doesn't necessarily present a CGI interface to your module, but it doesn't preclude it either.

        What if the call is POST?

        It seems that the ENV is empty