use Mojo::UserAgent; print Mojo::UserAgent->new->get('http://freegeoip.net/json/8.8.8.8')->res->json->{country_name};
Also check out the command line interface which allows you todo things like this:
$ mojo get http://mojolicio.us 'head > title'