Take a look at the uri_escape() method of URI::Escape.
In reply to Re: CGI fails to urlencode & chars in outbound url's by cjf in thread CGI fails to urlencode & chars in outbound url's by BrowserUk