Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add country codes from maxmind csv file
use warnings; use strict; use Text::CSV qw( csv ); my $d = csv(in => "GeoLite2-Country-Locations-en.csv", headers => "auto"); use Data::Dump qw(pp); for my $c (sort { $a->{country_iso_code} cmp $b->{country_iso_code}} @$d) { next unless $c->{country_name}; my $cc = lc($c->{country_iso_code}); my $co = lc($c->{continent_name}); $co =~ s/\s+/-/; unless ($cc) { warn pp($c); next; } print qq["$cc":\t"$co",\n]; }
- Loading branch information