From 8f0bc94ce04ab48504870bf3902879d7f1b1805b Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Tue, 4 Feb 2020 20:49:32 +0100 Subject: [PATCH] Fixes --- count-points.pl | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/count-points.pl b/count-points.pl index d441a53..bc5addf 100755 --- a/count-points.pl +++ b/count-points.pl @@ -16,27 +16,6 @@ if (-r 'overrides.txt') { read_overrides(); } -my @reports = sort @ARGV; - -my $total; -my %section_points = ('A' => 0, 'B' => 0, 'C' => 0); - -my $student_id = get_student_id(); - -if (defined $student_id) { - print "STUDENT ID is $student_id\n"; -} else { - print "UNKNOWN STUDENT ID\n"; -} - -intro(); - -for my $report (@reports) { - update_total($report, process_report($report)); -} - -outro($total); - my %to_hashes = map { $_ => 1 } split/\n/,<<'END_OF_HASHES'; 2982763 2982861 @@ -93,6 +72,27 @@ my %to_hashes = map { $_ => 1 } split/\n/,<<'END_OF_HASHES'; 3096331 END_OF_HASHES +my @reports = sort @ARGV; + +my $total; +my %section_points = ('A' => 0, 'B' => 0, 'C' => 0); + +my $student_id = get_student_id(); + +if (defined $student_id) { + print "STUDENT ID is $student_id\n"; +} else { + print "UNKNOWN STUDENT ID\n"; +} + +intro(); + +for my $report (@reports) { + update_total($report, process_report($report)); +} + +outro($total); + sub get_student_id { my $pwd = cwd();