in reply to Maintaining deltas of a long list

I have a similar case where I'm storing my data in a database, in this case I use database triggers to capture insert/delete/update events, and log them in a separate table, sort of like a transaction log. In this way, I have one table containing the current data, and another containing the (time ordered) change log.

You can also do the same if you are storing your data in a file. It's easy to find the difference between two lists (see the Cookbook's Array chapter), and write the diff in another file (or even the same file) with, say, +/- indicator.

Replies are listed 'Best First'.
Re^2: Maintaining deltas of a long list
by saintmike (Vicar) on Aug 13, 2004 at 06:32 UTC
    Algorithm::Diff determines diffs between two files and its sdiff method lets you even display before-and-after versions side-by-side.
      This is right in line with what I was looking for. Thanks!