my ($uri) = new URI("http://www.mydomain.com.au/test.html"); print $uri->host,"\n";