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