use CGI; use Geo::IPfree qw(LookUp); my ($countrycode,$country) = LookUp($cgi->remote_host); print $countrycode,"\n",$country; #### GB United Kingdom