Reputation: 1211
I was wondering if there's a Perl API I can use that would get 'co.uk' or '.de'. I want to map the country code onto a site domain to redirect people.
so if the country code is 'gb', then I'd redirect to .co.uk, without having to hardcode this in for every country.
Upvotes: 0
Views: 80
Reputation: 54371
The core module Locale::Country has a mapping from locales to top level domains.
Upvotes: 2