equal
deleted
inserted
replaced
1 #!/usr/bin/perl -w |
1 #!/usr/bin/perl -w |
2 |
2 |
3 use strict; |
3 use strict; |
4 |
4 use FindBin; |
|
5 |
|
6 |
|
7 # liest die Konfiguration ein |
|
8 my @configs = ("$FindBin::Bin/dnstools.conf", "/etc/dnstools.conf"); |
5 my %config; |
9 my %config; |
6 open (CONFIG, "dnstools.conf"); |
10 |
|
11 for (grep {-f} @configs) { |
|
12 open(CONFIG, $_) or die "Can't open $_: $!\n"; |
|
13 } |
|
14 |
|
15 unless (seek(CONFIG,0 ,0 )) { |
|
16 die "Can't open config (searched: @configs)\n" |
|
17 } |
|
18 |
7 while (<CONFIG>) { |
19 while (<CONFIG>) { |
8 chomp; |
20 chomp; |
9 s/#.*//; |
21 s/#.*//; |
10 s/\t//g; |
22 s/\t//g; |
11 s/\s//g; |
23 s/\s//g; |