I was wondering if there is a Perl module that will detect if two URLs are of the same root domain, for instance http://services.bestbuy.com/ and http://espanol.bestbuy.com/ would both be counted as having the same root domain.
I know that it’s possible with a regular expression, but I’d prefer it if there’s already a module someone to do this! I haven’t been able to find anything yet.
Does anyone know of any good solutions? Thanks!
I would use Domain::PublicSuffix.