ast has asked for the wisdom of the Perl Monks concerning the following question:
This code is not really useful when a Url is for example http://www.bla.co.uk/blubber/index.html ;-) Can anyone please give me a hint?$s = "http://www.blablubber.net/bla/index.html"; ($url,undef) = split(/\//,$s); @domain = split(/\./,$url); $tld = pop(@domain); $domainname = pop(@domain); $fqdn = "$domainname.$tdl";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get FQDN from Url
by jamesduncan (Novice) on Jul 23, 2003 at 15:06 UTC | |
|
Re: Get FQDN from Url
by Abigail-II (Bishop) on Jul 23, 2003 at 15:13 UTC | |
|
Re: Get FQDN from Url
by roju (Friar) on Jul 23, 2003 at 15:04 UTC | |
|
Re: Get FQDN from Url
by sauoq (Abbot) on Jul 24, 2003 at 00:05 UTC |