From 7b92031bf036d2f3cda239fc79967c5c0f14c19d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Jan 2003 12:21:45 +0000 Subject: cleanup and add a comment (!) --- perl-install/crypto.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm index 36912dc69..56af9893c 100644 --- a/perl-install/crypto.pm +++ b/perl-install/crypto.pm @@ -89,10 +89,9 @@ sub bestMirror { ++$value; } } - my ($min_value) = sort { $a <=> $b } values %mirror2value; + my $min_value = min(values %mirror2value); - my @possible = grep { $mirror2value{$_} == $min_value } keys %mirror2value; - push @possible, grep { $mirror2value{$_} == $min_value } keys %mirror2value; + my @possible = (grep { $mirror2value{$_} == $min_value } keys %mirror2value) x 2; #- increase probability push @possible, grep { $mirror2value{$_} == 1 + $min_value } keys %mirror2value; $possible[rand @possible]; -- cgit v1.2.1