in reply to get page URL
my $q = CGI->new(); my $url = $q->url(-absolute => 1); [download]
That should be as portable as CGI.pm, which is about as portable as you can get.