From 45e430869223a6265989da9ec235f3651f4711a1 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Mon, 9 Sep 2013 22:51:36 +0200 Subject: [PATCH] Fixed error messages in geonames_process.pl --- data/geonames/geonames_process.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/geonames/geonames_process.pl b/data/geonames/geonames_process.pl index a06ac7c..00c24fc 100644 --- a/data/geonames/geonames_process.pl +++ b/data/geonames/geonames_process.pl @@ -20,7 +20,7 @@ while () { } close(TIMEZONES); -open(COUNTRIES, 'countryInfo.txt') or die("Cannot open timeZones.txt: $!\n"); +open(COUNTRIES, 'countryInfo.txt') or die("Cannot open countryInfo.txt: $!\n"); while () { my ($country_code, $iso3, $iso_numeric, $fips, $name, $capital, $area, $population, $continent, $tld, $currency_code, $currency_name, $phone, $postal_code_format, $postal_code_regex, $languages, $geonameid, $neighbours, $equivalent_fips_code) = split(/\t/, $_); @@ -30,6 +30,8 @@ while () { } close(COUNTRIES); +open(GEONAMES, "HU.txt") or die("Cannot open HU.txt: $!\n"); + my $xml_file = IO::File->new('>geodata.xml'); my $writer = XML::Writer->new(OUTPUT => $xml_file, NEWLINES => 0); @@ -37,7 +39,6 @@ $writer->xmlDecl('utf-8'); $writer->startTag('geodata'); # TODO: process all files, not just HU.txt! -open(GEONAMES, "HU.txt") or die("Cannot open timeZones.txt: $!\n"); while () { my ($geonameid, $name, $asciiname, $alternatenames, $latitude, $longitude, $feature_class, $feature_code, $country_code, $alt_country_code, $admin1, $admin2, $admin3, $admin4, $population, $elevation, $dem, $timezone, $mod_date) = split(/\t/, $_);