- or download this
pattern 1: 1=2 2=3 0=-1
pattern 2: 1=2 3=4
pattern 3: 3=4 5=2
- or download this
# PART 1: Per-column pattern-matching values
...
'pattern 1' => 3,
'pattern 2' => 2,
'pattern 3' => 2
- or download this
my %pattern_colvals;
my %pattern_sizes;
...
push @{$pattern_colvals{$col}{$match_val}}, $pattern;
}
}
- or download this
# parse input CSV file and check for matches against patterns
...
}
}
}
- or download this
$ { echo -1,2,3,4,5,6
echo -1,2,4,0,0,9
...
line 1 matches pattern 1
line 1 matches pattern 2
line 3 matches pattern 3