perlquestion
flaviusm
<p>Hi,</p>
<p>I am using String::LCSS module to find the longest common substring of two strings and I don't get the result I am expecting. Can anybody tell me what am I doing wrong?
Thank you.</p>
<code>
#!/usr/bin/perl
require String::LCSS;
$s1 = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 18 19 20 21 22 23 7 24';
$s2 = '1 2 3 4 5 7 8 9 11 12 13 10 14 15 16 17 2 18 19 20 21 22 23 7 24';
$result = String::LCSS::lcss ($s1, $s2);
print $result;
</code>
<p> I am expecting to get "14 15 16 17 2 18 19 20 21 22 23 7 24" but I get instead " 11 12 13 1"</p>