in reply to Comparison of the row by using window size
Assuming your rows are compacted to strings:
my $row1 = pack 'C*', map 1+int( rand 2 ), 1..100; my $row2 = pack 'C*', map 1+int( rand 2 ), 1..100; substr( $row1, $_, 10 ) eq substr( $row2, $_, 10 ) and print "Found match at offset; $_" for 0 .. length( $row1 ) - 10;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Comparison of the row by using window size
by snape (Pilgrim) on Jan 27, 2010 at 14:43 UTC | |
by SuicideJunkie (Vicar) on Jan 27, 2010 at 14:52 UTC |