in reply to SQL vs Perl table comparing

I think you are right to question your approach here. Relational databases were made to do the kind of thing you're talking about here. Let's look at how you'd do these things.

Let's assume you have Table and BackupTable, which have the exact same columns and a primary key named 'Key'.

1. records existing only in first table

SELECT * FROM Table WHERE NOT EXISTS (SELECT * FROM BackupTable WHERE Table.Key = BackupTable.Key)

2. records existing only in second table

Same thing as 1, but switch the table names.

3. records with identical primary keys, but with different content.

The best I can think of here is to get a list of the primary key values that are in both tables but have different values.

SELECT Key FROM Table LEFT JOIN BackupTable ON Table.Key = BackupTable +.Key WHERE Table.column1 <> BackupTable.column1 OR Table.column2 <> B +ackupTable.column2 ......
Hopefully, Oracle provides some sort of utility to do this, but if I had to do it through straight SQL those are the things I would try.

Good Luck.

~CubicSpline
"No one tosses a Dwarf!"