ParseUtil::Domain(3) User Contributed Perl Documentation ParseUtil::Domain(3) NNAAMMEE ParseUtil::Domain - Utility for parsing a domain name into its constituent components. SSYYNNOOPPSSIISS use ParseUtil::Domain; my $processed = parse_domain("somedomain.com"); # $processed == { # domain => 'somedomain', # domain_ace => 'somedomain', # zone => 'com', # zone_ace => 'com' # } DDEESSCCRRIIPPTTIIOONN Just another tool for parsing domain names. This module makes use of the data provided by the _P_u_b_l_i_c _S_u_f_f_i_x _L_i_s_t (http://publicsuffix.org/list/) to parse tlds. For completeness it tries to provide the respective puny encoded and decoded domain and tld part of a domain name. This includes proper handling of the LLAATTIINN SSHHAARRPP SS which is now allowed by DENIC eG (.de). IINNTTEERRFFAACCEE ppaarrssee__ddoommaaiinn Arguments "string" Examples: 1. 'somedomain.com' 2. 'test.xn--o3cw4h' 3. 'bloss.co.at' 4. 'bloss.de' Return "HASHREF" Examples: 1. { domain => 'somedomain', zone => 'com', domain_ace => 'somedomain', zone_ace => 'com' } 2. { domain => 'test', zone => 'XXX', domain_ace => 'test', zone_ace => 'xn--o3cw4h' } 3. { domain => 'bloss', zone => 'co.at', domain_ace => 'bloss', zone_ace => 'co.at' } 4. { domain => 'bloss', zone => 'de', domain_ace => 'xn--blo-7ka', zone_ace => 'de' } DDEEPPEENNDDEENNCCIIEESS Net::IDN::Encode Net::IDN::Punycode Regexp::Assemble::Compressed The Public Suffix List at http://publicsuffix.org/list/ BBUUGGSS Although, not necessarily a bug, be wary of differences in encoding/decoding domains ending in ..ddee. These domains are not _n_a_m_e_p_r_e_ped like other tlds in order to allow for encoding of the German LLAATTIINN SSHHAARRPP SS. perl v5.10.1 2011-01-26 ParseUtil::Domain(3)