my $SQLString "select this, that from there"; $sth = $dbh->prepare($SQLString); $sth->execute(); if($sth->rows() == 0) { ........... }