Commit 3ed5cb91 authored by Robert Ricci's avatar Robert Ricci

Add support for negative scores (eg. late penalties)

parent 2a25ef9a
......@@ -12,7 +12,7 @@ my $total_possible = 0;
my $found_totalline = 0;
foreach my $line (@scorefile) {
if ($line =~ /^\s*(\d+(\.\d+)?|XX)(\s*\/\s*(\d+)\s*)?/) {
if ($line =~ /^\s*(\-?\d+(\.\d+)?|XX)(\s*\/\s*(\d+)\s*)?/) {
my ($score, $possible) = ($1, $4);
if ($score eq "XX") {
die "Score not filled on line: $line\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment