From dc9c3c2706648a4509bd4621421a5281be1e4be4 Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 12 Nov 1997 05:12:18 +0000 Subject: japanese zipcode tables. includes both 3/5 digits form and 7 digits form. just like /usr/share/misc/zipcodes. --- japanese/zipcodes/scripts/gennew.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 japanese/zipcodes/scripts/gennew.pl (limited to 'japanese/zipcodes/scripts/gennew.pl') diff --git a/japanese/zipcodes/scripts/gennew.pl b/japanese/zipcodes/scripts/gennew.pl new file mode 100644 index 00000000000..a7f1b87dbe8 --- /dev/null +++ b/japanese/zipcodes/scripts/gennew.pl @@ -0,0 +1,16 @@ +while (<>) { + s/"//g; + split(/,/, $_); + $_[2] =~ s/[ \t]//g; + $_[8] = '' if ($_[8] eq '以下に掲載がない場合'); + $zipstr = $_[6] . ' ' . $_[7] . ' ' . $_[8]; # uniq + $zipstr =~ s/[ \t]+$//; + $zip{$zipstr} = $_[2]; +} + +print "# Zip code:location\n"; +print "# 7 digits zipcode for japan, used since feb98.\n"; +foreach $i (sort {$zip{$a} cmp $zip{$b}} keys %zip) { + next if ($i eq ''); + print $zip{$i} . ':' . $i . "\n"; +} -- cgit