diff options
Diffstat (limited to 'dselect/methods/Dselect/Ftp.pm')
-rw-r--r-- | dselect/methods/Dselect/Ftp.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dselect/methods/Dselect/Ftp.pm b/dselect/methods/Dselect/Ftp.pm index 568e5f6f8..7f599a7b9 100644 --- a/dselect/methods/Dselect/Ftp.pm +++ b/dselect/methods/Dselect/Ftp.pm @@ -41,11 +41,11 @@ sub read_config { my ($code, $conf); local($/); - open(VARS, '<', $vars) || + open(my $vars_fh, '<', $vars) || die "Couldn't open $vars : $!\n" . "Try to relaunch the 'Access' step in dselect, thanks.\n"; - $code = <VARS>; - close VARS; + $code = <$vars_fh>; + close $vars_fh; my $VAR1; $conf = eval $code; @@ -68,9 +68,10 @@ sub store_config { # Check that config is completed return if not $config{'done'}; - open(VARS, '>', $vars) || die "Couldn't open $vars in write mode : $!\n"; - print VARS Dumper(\%config); - close VARS; + open(my $vars_fh, '>', $vars) || + die "Couldn't open $vars in write mode : $!\n"; + print $vars_fh Dumper(\%config); + close $vars_fh; } sub view_mirrors { |