As you are all probably aware urchin every month download ip database of google servers and resolves every ip and compares it against google db. It's not doing great job because most of ips are recognized as com, net, org and no entry.

In my case over 87% of data falls into that group, so I would like to ask somebody who is good in perl to check what is wrong with script from this site http://diaryproducts.net/about/operating_s..._ip_geolocation which translates geo IP data to urchin data. With Geo Ip database working with urchin, Urchin could recognize every ip by city, only limitation of free version is AOL memebers but I that is not that big deal.

It would be nice if somebody could take a look into that script and see what is wrong. If I try to execute it from shell i receive following msg:

CODE
./GeoIP2Urchin.pl < GeoIPCountryWhois.csv > domain.local
: command not foundline 2:
: command not foundline 18:
: command not foundline 24:
./GeoIP2Urchin.pl: line 25: use: command not found
: command not foundline 25:
: command not foundline 26:
./GeoIP2Urchin.pl: line 27: my: command not found
: command not foundline 27:
: command not foundline 28:
: command not foundline 33:
./GeoIP2Urchin.pl: line 34: sub: command not found
./GeoIP2Urchin.pl: line 35: my: command not found
: command not foundline 35:
./GeoIP2Urchin.pl: line 36: ^=: command not found
: command not foundline 36:
: command not foundline 37: return
./GeoIP2Urchin.pl: line 39: syntax error near unexpected token `$i'
./GeoIP2Urchin.pl: line 39: `            ? ( $i & 0b1111111100000000000000000000'000


Thanks in advance, for more info check this link: http://diaryproducts.net/about/operating_s..._ip_geolocation