Created
August 1, 2011 06:50
-
-
Save s-aska/1117672 to your computer and use it in GitHub Desktop.
zip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $zip; | |
open my $fh, "<:encoding(cp932)", $ken; | |
while (my $row = $csv->getline($fh)) { | |
next if $zip->{$row->[2]}; | |
$zip->{$row->[2]}++; | |
$model->insert( 'minotaur_zip', { | |
zip => $row->[2], | |
pref => substr($row->[0], 0, 2), | |
address1 => $row->[7], | |
address2 => $row->[8] | |
} ); | |
} | |
close $fh; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment