summaryrefslogtreecommitdiff
path: root/cidhash.pl
diff options
context:
space:
mode:
authorivan <ivan>2004-10-15 15:15:08 +0000
committerivan <ivan>2004-10-15 15:15:08 +0000
commit3768b709beed40479f29657ecf77a6357697951f (patch)
tree52015f7330e10abcc7159f5c8b2f206a79131026 /cidhash.pl
initial importSTART
Diffstat (limited to 'cidhash.pl')
-rwxr-xr-xcidhash.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/cidhash.pl b/cidhash.pl
new file mode 100755
index 0000000..70e5f0f
--- /dev/null
+++ b/cidhash.pl
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use Text::CSV_XS;
+use Locale::Country;
+
+$csv = new Text::CSV_XS;
+
+while (<>) {
+ my $status = $csv->parse($_) or die "can't parse: ".$csv->error_input."\n";
+ my($cid, $name) = $csv->fields();
+
+ print " '".country2code($name). "' => ", $cid. ",\n";
+}