in reply to problem endcoding URLs with embedded spaces

If you use the CGI.pm module it will do all the work for you.
use strict; use CGI; my $q = new CGI; my $url = $q->param("url"); # Log data print $q->redirect("$url");