in reply to Comparing hash data

If what you want to do is compare a CSV file to a database, why not use DBD::CSV?

You might find also find this node useful: CSV table diff utility