pdf2e164_cc.pl

来自「ATM 网 络 协 议 实 现 源 代 码」· PL 代码 · 共 28 行

PL
28
字号
#!/usr/bin/perl## The E.164 country code listing "List of ITU-T Recommendation E.164 Assigned# Country Codes" can be obtained from# The International Telecommunications Union (ITU) http://www.itu.org/# at http://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_717.html## Usage of this program:# perl pdf2e164_cc.pl e164_xxx.pdf >/etc/e164_cc#open(PDF2TXT, "pdftotext -raw $ARGV[0] - |");while(<PDF2TXT>) {	next unless /^(\d+)\s+(.+)\s+/;	last if $1 == 999;}while(<PDF2TXT>) {	next unless /^(\d+)\s+(.+)\s+/;	($country, $junk) = split(/\s{2,}/, $2, 2);	printf("%-3d %s\n", $1, $country) || die "printf: $!";	last if $1 == 999;}close(PDF2TXT);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?