if ($foohash->{$key} > $dbhash->{$key}) { # if any of these are greater, go ahead and update print "An update to $key has occured!\n"; print("to " . $foohash->{$key} . " from " . $dbhash->{$key} . "\n"); #$dbh->do( # "update daily_urls set $key = " . $foohash->{$key} . # "where id = " . $check->[0]->[0] #); }