summaryrefslogtreecommitdiffstats
path: root/MDK/Common/File.pm
diff options
context:
space:
mode:
Diffstat (limited to 'MDK/Common/File.pm')
-rw-r--r--MDK/Common/File.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/MDK/Common/File.pm b/MDK/Common/File.pm
index a2f9cf1..d3a4fd3 100644
--- a/MDK/Common/File.pm
+++ b/MDK/Common/File.pm
@@ -163,11 +163,9 @@ sub cp_af {
warn "symlink: can't create symlink $dest: $!\n";
}
} else {
- local (*F, *G);
- open F, $src or die "can't open $src for reading: $!\n";
- open G, "> $dest";
- local $_;
- while (<F>) { print G $_ }
+ local *F; open F, $src or die "can't open $src for reading: $!\n";
+ local *G; open G, "> $dest";
+ local $_; while (<F>) { print G $_ }
chmod((stat($src))[2], $dest);
}
}
@@ -210,7 +208,8 @@ sub substInFile(&@) {
my ($f, $file) = @_;
if (-s $file) {
local @ARGV = $file;
- local ($^I, $_) = '';
+ local $^I = '';
+ local $_;
while (<>) {
$_ .= "\n" if eof && !/\n/;
&$f($_);