in reply to FInding the longest match from an initial match between two files
Is this the kind of thing you are doing?
#!/usr/bin/perl -l use strict; use warnings; my $k = 5; my $file1contents = 'TACATCTCAAAACACTTTCATCTCACGACTACTACTACTACTTCAAAAC +ACCATCAT'; my $file2contents = 'ACTTCAACATAACTACTATATACTACTCATACTACTACTCTTAAAACTA +CTATACTA'; $_ = "$file1contents\n$file2contents"; print "at position $-[0] is match $1" while /(.{$k,}) (?= .* \n .* \1 +)/gx;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: FInding the longest match from an initial match between two files
by Cristoforo (Curate) on Nov 09, 2016 at 17:46 UTC | |
by tybalt89 (Monsignor) on Nov 09, 2016 at 18:51 UTC |