How To Use GeoIP2 (mmdb) Database With Perl

Published on Author gryzli

This article is the result of my struggles to properly use GeoIP v2 database within Perl.    TL;DR  The FASTEST way to use the database is by installing and utilizing the “MaxMind::DB::Reader::XS” perl module.  And here is a tiny example: use MaxMind::DB::Reader::XS ;  use Data::Dumper;  my $geoip_country = MaxMind::DB::Reader::XS->new( file => ‘/usr/share/GeoIP/GeoIP2-Country.mmdb’ ); print Dumper… Continue reading How To Use GeoIP2 (mmdb) Database With Perl