summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-11-24 19:20:30 +0000
committerFrancois Pons <fpons@mandriva.com>1999-11-24 19:20:30 +0000
commitd7c6e8b958a653501f480b1cdc02c5020306669f (patch)
tree5320f01f21e0e2d68a2b5e5cfab4f73b17d4639d /perl-install/common.pm
parentef80e39ba0bde1a7022c864fc092f1b6575449d8 (diff)
downloaddrakx-backup-do-not-use-d7c6e8b958a653501f480b1cdc02c5020306669f.tar
drakx-backup-do-not-use-d7c6e8b958a653501f480b1cdc02c5020306669f.tar.gz
drakx-backup-do-not-use-d7c6e8b958a653501f480b1cdc02c5020306669f.tar.bz2
drakx-backup-do-not-use-d7c6e8b958a653501f480b1cdc02c5020306669f.tar.xz
drakx-backup-do-not-use-d7c6e8b958a653501f480b1cdc02c5020306669f.zip
*** empty log message ***
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(&@) {