http://qs1969.pair.com?node_id=578383

abachus has asked for the wisdom of the Perl Monks concerning the following question:

Good day all,

I would like to extract a domain name from an arbitrary url. A nice easy example :


From -> http://yahoo.co.uk/notfound.html
extract only -> yahoo.co.uk

The data will be coming from a UserAgent request header, so i will need to grab the GET *url* HTTP/1.1 line and work from there. Any thoughts on the best way to do this ?



many thanks,

Isaac Close.