next unless $i++;
chomp($_);
@_ = (split("\t",$_))[1,2,3,4];
- #push @_,0 if (@_<4);
#$_[1] = join("\t",reverse split('/',$_[1]));
print join ("\t",@_)."\n";
}
+++ /dev/null
-#!/usr/bin/env perl
-use strict;
-use warnings;
-#exec('curl -s http://download.geonames.org/export/zip/allCountries.zip | zcat');
-#exit;
-@ARGV = ('curl -s http://download.geonames.org/export/zip/allCountries.zip | zcat |');
-
-while (<>) {
- chomp($_);
- @_ = split("\t",$_);
- print join ("\t",@_)."\n";
-}
--- /dev/null
+#!/usr/bin/env perl
+use strict;
+use warnings;
+#exec('curl -s http://download.geonames.org/export/zip/allCountries.zip | zcat');
+#exit;
+@ARGV = ('curl -s http://download.geonames.org/export/zip/allCountries.zip | zcat |');
+
+while (<>) {
+ chomp($_);
+ s,\\\t,\t,g; # fix error
+ @_ = split("\t",$_);
+ push @_,0 if (@_<12);
+
+ $_ = $_[0];
+ $_[0] = $_[1];
+ $_[1] = $_;
+
+
+ print join ("\t",@_)."\n";
+}