Nick Tonkin <[EMAIL PROTECTED]> writes:

> Hi all,
> 
> I'm working on a tool that should compare two versions of a file (usually,
> a web page) and report the _number_ of changes from one to the other. I've
> played with Algorithm::Diff as well as standard diff and haven't found a
> really sane way to "count" changes.
> 
> With Algorithm::Diff the output appears to be too granular: if I add five
> words onto a sentence it counts five changes, when it surely "is" only one
> ...

Wow, this really is OT, but what the hey, it's Friday.  There is no way
that what you've described is going to work.  If I add a word to a sentence
on Monday and a second word on Tuesday, there have been two changes.  From
your description, your ultimate solution would report one change when there
have been two.

The only way to get what you want is with version control software.  You
can write your own, but I'd recommend CVS (www.cvshome.org).

> 
> And diff combines all changes on one line into "one," afaics ...
> 
> Has anyone tackled this issue before?
> 
> Thanks,
> 
> ~~~~~~~~~~~
> Nick Tonkin

Reply via email to