P is for Practical | |
PerlMonks |
Re: longest common substring... almost?by haoess (Curate) |
on Apr 18, 2004 at 19:26 UTC ( [id://346145]=note: print w/replies, xml ) | Need Help?? |
There's a difference between I'm trying to write a script which generates the longest common substring + 1 character for each line in a file. and I'm trying to get the script to return the smallest number of characters to uniquely identify each line. Assume the following lines:
In the first case, the output should be
In the second case, output should be
For the first case, this should work:
-- Frank ('s first post at perlmonks)
In Section
Seekers of Perl Wisdom
|
|