OP didn't give much information. If it's a single perl process then the race condition would be in the database. If he is using fork (e.g.,) and making the DB calls inside of one of the 2+ perl processes this implies, then he could have a race condition. No? Can't tell unless we get more information.