in reply to DBI, rows, and do

What are you trying to do with

( my @dat = @_ ) =~ /^\d+$/;
? AFAICT, that regex is being matched against the size of @_, but you don't do anything with the results of the match (unless you use something like an evil $& in a part of the code that is not shown).

the lowliest monk