use CGI; my $c = new CGI; my $SCRIPT = $c->url( -absolute=>1 );