Thats not the way execute works in DBI. Check the docs, but to summarise for you now
If an error occurs you get undef back
If it doesn't know the number of rows affected get -1 back
If no rows are affected you will get 0E0 back.
otherwise you get the number of rows affected
The last time I tried it on MySQL it worked like that... but that was a while ago things may have changed...
hope my old company doesn't upgrade their DBI because I used that return value from execute on a number of scripts which worked fine under that version of dbi... Thanks for the update.