summaryrefslogtreecommitdiffstats
path: root/tools/2isdndb.pm
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-09-30 00:57:41 +0000
committerdamien <damien@mandriva.com>2000-09-30 00:57:41 +0000
commit0c7a9513b41f6950292bd38f5535b5c3a3b5ddc6 (patch)
treee41b1f7a5abb884555d28fcf9cfbcefd9589953f /tools/2isdndb.pm
parent8021e2174f63239942259f5cec5f5908cffb8ac9 (diff)
downloaddrakx-0c7a9513b41f6950292bd38f5535b5c3a3b5ddc6.tar
drakx-0c7a9513b41f6950292bd38f5535b5c3a3b5ddc6.tar.gz
drakx-0c7a9513b41f6950292bd38f5535b5c3a3b5ddc6.tar.bz2
drakx-0c7a9513b41f6950292bd38f5535b5c3a3b5ddc6.tar.xz
drakx-0c7a9513b41f6950292bd38f5535b5c3a3b5ddc6.zip
better algo
Diffstat (limited to 'tools/2isdndb.pm')
-rw-r--r--tools/2isdndb.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/2isdndb.pm b/tools/2isdndb.pm
index 4b0f9d8f7..536808706 100644
--- a/tools/2isdndb.pm
+++ b/tools/2isdndb.pm
@@ -2,16 +2,18 @@ open F, "isdndb.txt" or die "file $file not found";
open G, ">tutu" or die "file $file not found";
foreach (<F>) {
s/\#.*//;
- s/\[City\]\s+National//;
+# s/\[City\]\s+National//;
/\[Country\]\s*(.*)/ and $country = $1;
/\[City\]\s*(.*)/ and $city = $1;
/\[Name\]\s*(.*)/ and $name = $1;
/\[Prefix\]\s*(.*)/ and $prefix = $1;
/\[ISDN\]\s*(.*)/ and $isdn = $1;
+ /\[Encaps\]\s*.*/ and do { defined $dns1 and $dns2=""; };
/\[Domain\]\s*(.*)/ and $domain = $1;
/\[DNS\]\s*(.*)/ and ($dns1 ? $dns2 : $dns1) = $1;
+ /\[End\]\s*(.*)/ and do { undef $name; undef $prefix; undef $isdn; undef $domain; undef $dns1; undef $dns2; };
if ($isdn && !$prefix) { $prefix = "" }
- if (defined $name && defined $prefix && defined $isdn && defined $domain && defined $dns1 && defined $dns2) {
+ if (defined $name && defined $isdn && defined $domain && defined $dns1 && defined $dns2) {
print G join("|", $country, $city, join("=>", $name, $prefix . $isdn, $domain, $dns1, $dns2)), "\n";
undef $name;
undef $prefix;