corrupt razred/skola
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 21 Nov 2023 09:01:15 +0000 (10:01 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 21 Nov 2023 09:01:15 +0000 (10:01 +0100)
upari.pl

index a189fe7..3430566 100755 (executable)
--- a/upari.pl
+++ b/upari.pl
@@ -1,7 +1,5 @@
 #!/usr/bin/perl
 
-# TODO: skola <-> razred swap?
-
 use warnings;
 use strict;
 use autodie;
@@ -91,8 +89,8 @@ foreach my $nr ( 1 .. 4 ) {
        while (my $row = $csv->getline ($fh)) {
                $stat->{lines}->{$nr}++;
                $stat->{ $file }->{lines}++;
-               $row->[1] =~ s/\D+//g && print 'c1';
-               $row->[2] =~ s/\D+//g && print 'c2';
+               $row->[1] =~ s/\D+//g && $stat->{corrupt}->{skola}->{$nr}++ && print 'c1';
+               $row->[2] =~ s/\D+//g && $stat->{corrupt}->{razred}->{$nr}++ && print 'c2';
                my $id = join('-',
                        uc $row->[0],
                        $row->[1],