in reply to URL redirection

You might have used print statement before doing CGI redirect. You can also use print "Location: http://www.somewhere.com\n\n";
or else you can use
<META HTTP-EQUIV="refresh" content="1;URL=http://www.somewhere.come/">