in reply to CGI question

You could set $ENV{QUERY_STRING} before executing the cgi script.

cephas