Help for this page

Select Code to Download


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