in reply to
IP Origination
This isn't advisable at all, the mapping simply isn't reliable.
However, if you're determined then you may wish to look at
Geo::IP
Comment on
Re: IP Origination
In Section
Seekers of Perl Wisdom