summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 33999ac11..148011f51 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -351,17 +351,14 @@ sub template2file($$%) {
my ($inputfile, $outputfile, %toreplace) = @_;
local *OUT; local *IN;
- open IN , $inputfile or die "Can't open $inputfile $!";
+ open IN, $inputfile or die "Can't open $inputfile $!";
if ($::testing) {
*OUT = *STDOUT;
} else {
open OUT, ">$outputfile" or die "Can't open $outputfile $!";
}
- while (<IN>) {
- s/@@@(.*?)@@@/$toreplace{$1}/g;
- print OUT;
- }
+ map { s/@@@(.*?)@@@/$toreplace{$1}/g; print OUT; } <IN>;
}
sub substInFile(&@) {