tomazos has asked for the wisdom of the Perl Monks concerning the following question:

I have two scalars containing two similiar sequences of English text (1+ paragraphs). One is a draft, one contains minor edits (sentence added, sentance removed, spelling corrections, etc). I want to get a quick English readable version of the differences between them (eg "Sentance 'The quick brown fox jumped.' added at line 34. Sentance 'The lazy cat ran.' removed at line 37. 'and further more' changed to 'and, furthermore' at line 50, etc). I was about to embark on writing a module to do it, but it occurs to me that one might already be on CPAN. Any ideas?

-Andrew.


Andrew Tomazos  |  andrew@tomazos.com  |  www.tomazos.com

Replies are listed 'Best First'.
Re: Comparing two English paragraphs.
by BrowserUk (Patriarch) on Jul 02, 2005 at 07:00 UTC

    Algorithm::Diff


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
Re: Comparing two English paragraphs.
by fmerges (Chaplain) on Jul 02, 2005 at 12:20 UTC