On 1/4/07, Igor Sutton <[EMAIL PROTECTED]> wrote:
> I tried this Igor and it doesn't do exactly what I'm looking for. I
> checked the docs and don't think it will do exactly what I want. I need
> to do some more reading though. What I want to extract is the domain
> name, ala:
>
> asldkjlkwerj.com
> alaskjhhawe.com
> qwlkjekwl.com
It's right, because URI gives you the host part of uri.
What is the problem you are trying to solve?
It gives the host, not the domain. Given input like
'http://www.example.com/some.html', he wants 'example.com' (the
domain), not 'www.example.com' (the "host"/fqdn). I'd try something
like:
my $domain = $1 if $uri->host =~ /^.+\.([^.]+\.[^.]+)\s*$/; # untested
HTH,
-- jay
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!