> use URI::URL; > $attr_value = "products/index.html"; # This is a valid relative link! > $url = url $attr_value; > $host = $url->host;
>From the point of view of the URI object, 'products/index.html' is not a
URL, it is a path. Therefore, you should try
my $url = new URI;
$url->path('products/index.html');
But I'm not sure what good is a URL without a host...
--
- - Martin 'Kingpin' Thurn
