I really can't see anything wrong with your error handling code either. One possibility is that your database doesn't handle utf8 encoded data (sorry, I'm not a MySQL guy). Can you narrow it down to a smaller test case that fails? Feel free to email me some code and test data to: grantm(at)cpan.org
You may be interested in some feedback on your code (if not, please ignore the following).
1. A quick and dirty way to get a list of files is:
my @files = <$xdir/*xml>;(This is a little different from your code in that elements in @files now include the pathname too).
2. You call $dbh->prepare() in the for loop - it would be more efficient to do that once before the loop.
3. You call $sth->finish() after execute. That's tidy, but you almost never need to call finish(). It mostly there so that if you 'last' out of a fetch loop, you can call finish to tell DBI it can discard any unfetched rows.
In reply to Re: eval not catching XML Parser die
by grantm
in thread eval not catching XML Parser die
by agoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |