summaryrefslogtreecommitdiff
path: root/make_tld_serv.pl
diff options
context:
space:
mode:
authorMarco d'Itri <md@linux.it>2009-08-12 15:31:20 +0200
committerMarco d'Itri <md@linux.it>2013-03-30 02:31:38 +0100
commit6b108b4fd4b411d6814a35d4ca5e5939dda42c02 (patch)
tree2828f2d9f8a1a5c46bb1d82a554c36ad0af77c0b /make_tld_serv.pl
parent4ee9510383b539e54b0791951a4fbf5f457a5708 (diff)
downloadwhois-6b108b4fd4b411d6814a35d4ca5e5939dda42c02.tar.gz
Imported Debian version 4.7.35v4.7.35
Diffstat (limited to 'make_tld_serv.pl')
-rwxr-xr-xmake_tld_serv.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/make_tld_serv.pl b/make_tld_serv.pl
index b9ad913..968494b 100755
--- a/make_tld_serv.pl
+++ b/make_tld_serv.pl
@@ -1,22 +1,23 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
+use warnings;
use strict;
while (<>) {
chomp;
- s/^\s*(.*)\s*$/$1/;
- s/\s*#.*$//;
+ s/#.*$//;
+ s/^\s+//; s/\s+$//;
next if /^$/;
+
die "format error: $_" unless
(my ($a, $b) = /^([\w\d\.-]+)\s+([\w\d\.:-]+|[A-Z]+\s+.*)$/);
+
$b =~ s/^W(?:EB)?\s+/\\x01/;
- $b =~ s/^M(?:SG)?\s+/\\x02/;
+ $b =~ s/^VERISIGN\s+/\\x04/;
$b = "\\x03" if $b eq 'NONE';
- $b = "\\x04" if $b eq 'CRSNIC';
$b = "\\x07" if $b eq 'PIR';
$b = "\\x08" if $b eq 'AFILIAS';
- $b = "\\x09" if $b eq 'NICCC';
$b = "\\x0C" if $b eq 'ARPA';
- print " \"$a\",\t\"$b\",\n";
+ print qq( "$a",\t"$b",\n);
}