diff options
author | Francois Pons <fpons@mandriva.com> | 2000-11-14 15:31:59 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-11-14 15:31:59 +0000 |
commit | 949a885497d3d05e4dc0dc20e52ecb758d9b677c (patch) | |
tree | 0e7a20d9c3694bc4c392ea420607b7cbacdf3814 /perl-install/network.pm | |
parent | 01975efac2cb7e05fbe05ec3733ae904669a1e94 (diff) | |
download | drakx-backup-do-not-use-949a885497d3d05e4dc0dc20e52ecb758d9b677c.tar drakx-backup-do-not-use-949a885497d3d05e4dc0dc20e52ecb758d9b677c.tar.gz drakx-backup-do-not-use-949a885497d3d05e4dc0dc20e52ecb758d9b677c.tar.bz2 drakx-backup-do-not-use-949a885497d3d05e4dc0dc20e52ecb758d9b677c.tar.xz drakx-backup-do-not-use-949a885497d3d05e4dc0dc20e52ecb758d9b677c.zip |
removed foreach (<... which are eating memory
Diffstat (limited to 'perl-install/network.pm')
-rw-r--r-- | perl-install/network.pm | 6 |
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; |