my $res = $dbh->selectall_arrayref($stmt); print scalar(@$res);