in reply to Passing URL parameters to a CGI script from the shell

What jasonk said was good. If you don't really need to use url_param (I don't know if you do), you can use the param method (which will fetch data from POST or GET) and easily emulate the script being passed data by specifying name=value pairs as arguments. For example: ./myscript.cgi mode=1 foo=bar.

Update Just wanted to note that cbro was right about using QUERY_STRING.