use strict; use Carp; use Win32::ODBC; my $db = new Win32::ODBC("SomeAccessDatabase"); my %IDcache; my $MaxEntityID = GetMaxID("ENTITIES"); my @tests = ( [COUNTRY=>"UNITED_STATES"], [PERSON=>"FRED"], [PERSON=>"JOE"] ); foreach my $test (@tests) { my $id = GetEntityID($test->[0],$test->[1]); if (!$id) { AddEntity($test->[0],$test->[1]); } }