in reply to Re^2: Finding a LCS module on word level
in thread Finding a LCS module on word level

Your question is still a little unclear to me, but this will give you the consecutive "perl module".

#!/usr/bin/perl use strict; use warnings; use String::LCSS_XS qw(lcss); my $longest = lcss ( "perl find perl module", "perl module"); print $longest, "\n";

Replies are listed 'Best First'.
Re^4: Finding a LCS module on word level
by Limbic~Region (Chancellor) on May 10, 2008 at 00:33 UTC
    Khen1950fx,
    Presumably, the distinction the OP is trying to make between chars and words has to do with matching the entire word as well as white space.
    Perl Monks is the best What is the best place to eat should produce "is the best" regardless of white space
    Have you ever seen the rain I have never seen the rain should produce "seen the rain" not "ever seen the rain"
    String::LCSS_XS does not do this.

    Cheers - L~R