9 next unless ($_[0] > 0 and $_[0] < 31);
11 $spread = $_[1] - $_[2];
12 unless (defined $min_spread)
15 $min_spread = $spread;
17 if ($spread <= $min_spread)
20 $min_spread = $spread;
23 print $spread_day, "\n";
34 next unless ($_[0] > 0 and $_[0] < 21);
36 $spread = abs($_[6] - $_[8]);
37 unless (defined $min_spread)
40 $min_spread = $spread;
42 if ($spread <= $min_spread)
45 $min_spread = $spread;
48 print $spread_team, "\n";
59 my $label_col = shift;
60 my $alpha_col = shift;
63 my ($spread_label, $min_spread) = ("", 100000);
69 next unless ($_[$alpha_col] =~ /^[0-9]+/);
70 next unless ($_[$beta_col] =~ /^[0-9]+/);
71 my $label = $_[$label_col];
72 my $spread = abs($_[$alpha_col] - $_[$beta_col]);
73 unless (defined $min_spread)
76 $spread_label = $label;
77 $min_spread = $spread;
79 if ($spread <= $min_spread)
81 $spread_label = $label;
82 $min_spread = $spread;
89 print "part1: ", dm("../K4Weather.txt", 0, 1, 2), "\n";
90 print "part2: ", dm("../K4Soccer.txt", 1, 6, 8), "\n";