perl get base url of url
===

In my application I need to get the base url of any url. Up until now I've been getting it like so:

    $resp->base;

Where `$resp` is a <a href="http://search.cpan.org/~gaas/HTTP-Message-6.03/lib/HTTP/Response.pm">HTTP::Response</a> object. However, now I need to know the base of urls <i>without</i> actually requesting them and getting an HTTP::Response object back. Does anyone know of a way to do this? Thanks!