in reply to Question about Algorithm::Diff

CVS already does this, and is open source. Perhaps you can steal what they are doing.

-- Randal L. Schwartz, Perl hacker