summaryrefslogtreecommitdiffstats
path: root/perl-install/network.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r--perl-install/network.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/network.pm b/perl-install/network.pm
index 126bb00fc..5e687c857 100644
--- a/perl-install/network.pm
+++ b/perl-install/network.pm
@@ -32,7 +32,8 @@ sub read_resolv_conf {
my %netc;
local *F; open F, $file or die "cannot open $file: $!";
- foreach (<F>) {
+ local $_;
+ while (<F>) {
/^\s*nameserver\s+(\S+)/ and $netc{shift @l} = $1;
}
\%netc;
@@ -88,7 +89,8 @@ sub write_resolv_conf {
my (%search, %dns, @unknown);
local *F; open F, $file;
- foreach (<F>) {
+ local $_;
+ while (<F>) {
/^[#\s]*search\s+(.*?)\s*$/ and $search{$1} = $., next;
/^[#\s]*nameserver\s+(.*?)\s*$/ and $dns{$1} = $., next;
/^.*# ppp temp entry\s*$/ and next;