# awdb-perl **Repository Path**: aiwen_home/awdb-perl ## Basic Information - **Project Name**: awdb-perl - **Description**: 使用perl语言解析awdb离线库 - **Primary Language**: Perl - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-03-23 - **Last Updated**: 2024-12-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AWDB-Perl AWDB::Reader - 读取AWDB文件中的IP地址(Read the IP address in the AWDB file) www.ipplus360.com 官方支持的解析awdb格式的perl代码(Official support for parsing Perl code in AWDB format) ## Introduction my $reader = AWDB::Reader->new( file => 'path/test.awdb' ); my $result = $reader->get_result_address('166.111.4.100'); ## Demo vi example.pl #!/usr/bin/env perl use strict; use warnings; use feature qw( say ); use Data::Printer; use AWDB::Reader; my $reader = AWDB::Reader->new( file => 'test.awdb' ); my $record = $reader->get_result_address('1.24.192.0'); say np $record; 测试代码: perl example.pl 控制台输出: \ { accuracy "城市", areacode "CN", asnumber 139007, city "乌兰察布市", continent "亚洲", country "中国", isp "中国联通", latwgs 41.014882, lngwgs 113.098956, owner "中国联通", province "内蒙古自治区", radius 212.9276, source "数据挖掘", timezone "UTC+8", zipcode "011026" }