diff options
Diffstat (limited to 'make_as32_del.pl')
-rwxr-xr-x | make_as32_del.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/make_as32_del.pl b/make_as32_del.pl index 663e7f6..6382679 100755 --- a/make_as32_del.pl +++ b/make_as32_del.pl @@ -3,10 +3,10 @@ use warnings; use strict; -while (<STDIN>) { +while (<>) { chomp; - s/^\s*(.+)\s*$/$1/; - s/\s*#.*$//; + s/#.*$//; + s/^\s+//; s/\s+$//; next if /^$/; my ($fh, $fl, $lh, $ll, $s, $f, $l); @@ -16,10 +16,10 @@ while (<STDIN>) { $l = ($lh << 16) + $ll; my $server = ($s =~ /\./) ? $s : "whois.$s.net"; - print qq({ $f, $l,\t"$server" },\t/* $fh.$fl $lh.$ll */\n); + print qq|{ ${f}u, ${l}u,\t"$server" },\t/* $fh.$fl $lh.$ll */\n|; } elsif (($f, $l, $s) = /^(\d+)\s+(\d+)\s+([\w\.-]+)$/) { my $server = ($s =~ /\./) ? $s : "whois.$s.net"; - print qq({ ${f}u, ${l}u,\t"$server" },\n); + print qq|{ ${f}u, ${l}u,\t"$server" },\n|; } else { die "format error: $_"; } |