in reply to Help with 'Use of uninitialized value...' error in DB code
One other note: you refer frequently in your code to two hashes %vars and %temp_vars. Where do these get populated? What do they contain? You do take a parameter called $temp_vars, a scalar, but then you don't use it at all. And where is line 10 of your code?