Greetings Roy Johnson,
I learn more Perl from reading your code. It took me a while, but somehow overlooked the line sorting $strings before walking through the list.
Today, came to realization that Perl can do bitwise operations on strings.
my ($common) = map length, ($strings[$i1][0] ^ $strings[$i2][0]) =~ /^ +(\0*)/;
Thank you for this.
In reply to Re^4: Fast common substring matching
by marioroy
in thread Fast common substring matching
by GrandFather
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |