my $url_parm = 'http://www.whatzit.com?a=1&b=2'; $url_parm =~ s/&/&/sg; my $url = "http:/www.xyzzy.com?url=$url_parm";