use CGI; ... $url_escaped = CGI::escape($url_text); [download]
(Thanks to arturo for catching a freudian typo.)
In reply to Re: URL escaping by dws in thread URL escaping by thealienz1