use CGI; use URI::Escape; use Socket qw(:crlf); my $q = CGI::param('search_google') . ' site:perlmonks.thepen.com'; $q = uri_escape( $q ); print "Location: http://www.google.com/search?q=$q", CRLF, CRLF;