Help for this page

Select Code to Download


  1. or download this
    my @output = qx(geoip -s 209.197.123.153);
    print Dumper(\@output);
    print $output[5];
    #Country   : US  United States
    
  2. or download this
    use JSON::PP qw/decode_json/;
    use IPC::Run3::Shell::CLIWrapper;
    
    my $geoip = IPC::Run3::Shell::CLIWrapper->new( { fail_on_stderr=>1, st
    +dout_filter => sub {$_=decode_json($_)} }, qw/ geoip --json --DB=dbi:
    +SQLite:dbname=geoip / );
    my $data = $geoip->('115.66.224.70');