Your question got me digging again into my copy of Mastering Algorithms with Perl. I've heard it said that the book is getting dated, and that it is a little out of sync with the "best practices" of 2012. But algorithms themselves never really go out of style, and I still find it to be an excellent resource as long as you keep in mind that the algorithms are sound, but their implementations might deserve some Perlish modernization. I first read it around 2003-2004, but seldom a month passes that I don't refer back to it for one thing or another.

Chapter nine of the book has a section called "String-Matching Algorithms". If you're in a Perl shop, someone in the office surely has a copy of this book. And if not, find a used copy on Amazon or something. It's worth it. There are a number of string matching algorithms discussed in the chapter. Some of them are used for "exact" matches, and some for "approximate".

The next section in the same chapter discusses phonetic algorithms such as what is implemented by Text::Soundex. It also mentions Schwern's (at the time experimental) Text::Metaphone. I see that more recent releases of that module are no longer considered experimental.

The book gives a lot to chew on.


Dave


In reply to Re^3: Compare String within an Array by davido
in thread Compare String within an Array by tosaiju

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.