|
Revision 631, 325 bytes
(checked in by mbr, 6 years ago)
|
Initial revision
|
- Property svn:eol-style set to
native
- Property svn:executable set to
*
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
use strict; |
|---|
| 4 |
|
|---|
| 5 |
while (<>) { |
|---|
| 6 |
chomp; |
|---|
| 7 |
s/^\s*(.*)\s*$/$1/; |
|---|
| 8 |
s/\s* |
|---|
| 9 |
next if /^$/; |
|---|
| 10 |
die "format error: $_" unless (/^([\d\.]+)\s+([\d\.]+)\s+([\w\.]+)$/); |
|---|
| 11 |
my $f=$1; my $l=$2; my $s=$3; |
|---|
| 12 |
print "{ ${f}, ${l}, \""; |
|---|
| 13 |
if ($s =~ /\./) { |
|---|
| 14 |
print "$s"; |
|---|
| 15 |
} else { |
|---|
| 16 |
print "whois.$s.net"; |
|---|
| 17 |
} |
|---|
| 18 |
print "\" },\n"; |
|---|
| 19 |
} |
|---|
| 20 |
|
|---|