I have a list of million urls. I need to extract the TLD for each url and create multiple files for each TLD. For example collect all urls with .com as tld and dump that in 1 file, another file for .edu tld and so on. Further within each file, I have to sort it alphabetically by domains and then by subdomains etc.
Can anyone give me a head start for implementing this in perl?
host
method to get the host,get_root_domain
to parse the host name.tld
orsuffix
method to get the real TLD or the pseudo TLD.