$rowcount = $dbh->do("select * from TABLE"); #### sub do { my($dbh, $statement, $attr, @params) = @_; my $sth = $dbh->prepare($statement, $attr) or return undef; $sth->execute(@params) or return undef; return undef if $sth->err; while(my $dat = $sth->fetch) { return undef if $sth->err; } my $rows = $sth->rows; ($rows == 0) ? "0E0" : $rows; }