lines and see what happens. Your code looks correct, but you may be getting some seg faults from the undefs. It looks like your scoping will handle clean-up rather nicely anyway.
It's worth a shot. :) BTW, what platform are you running on? And, how many files are you processing? Does it bomb if you run on 1 or 2 files?
statement? Try to see if it's an XML::Parser problem or a DBI problem.