use CGI; use URI::Escape; # here put code that prints out the page header, etc. my $secondurl = 'http://www.myothersite.com/myotherwebapp2/foo.asp?param=1¶m=3'; my $initialurl = 'http://www.mysite.com/mywebapp1/dosomething?' . 'url=' . uri_escape($secondurl); print 'launch mywebapp'; # code that does that does the page footer