diff options
author | Francois Pons <fpons@mandriva.com> | 1999-11-24 19:20:30 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 1999-11-24 19:20:30 +0000 |
commit | d7c6e8b958a653501f480b1cdc02c5020306669f (patch) | |
tree | 5320f01f21e0e2d68a2b5e5cfab4f73b17d4639d /perl-install/common.pm | |
parent | ef80e39ba0bde1a7022c864fc092f1b6575449d8 (diff) | |
download | drakx-d7c6e8b958a653501f480b1cdc02c5020306669f.tar drakx-d7c6e8b958a653501f480b1cdc02c5020306669f.tar.gz drakx-d7c6e8b958a653501f480b1cdc02c5020306669f.tar.bz2 drakx-d7c6e8b958a653501f480b1cdc02c5020306669f.tar.xz drakx-d7c6e8b958a653501f480b1cdc02c5020306669f.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r-- | perl-install/common.pm | 7 |
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(&@) { |