X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/ca8caa9227ad9151bd57ab7eccab2c8947ea55da..e7c68cd940f8ab1a8de85f6685367cfb7eb6378f:/tools/mkcountries-geonames diff --git a/tools/mkcountries-geonames b/tools/mkcountries-geonames index 325379c..91daae7 100755 --- a/tools/mkcountries-geonames +++ b/tools/mkcountries-geonames @@ -52,9 +52,10 @@ my %cc; # map of country code to info array while (<>) { /^#/ and next; # skip comments - my ($iso, $name, $cont) = (split /\t/)[0, 4, 8]; - my $class = "c-\L$cont"; - $cc{ lc $iso } = [ $name, $class ]; + my ($iso, $name, $cont, $tld) = (split /\t/)[0, 4, 8, 9]; + my @info = ($name, "c-\L$cont"); + $info[3] = $tld if $tld =~ s/\A\.// and $tld ne lc $iso; + $cc{ lc $iso } = \@info; } $cc{io}->[2] = "Chagos Islands";