http://qs1969.pair.com?node_id=465030


in reply to Select COUNT in MySQL

Alternatively, you may use selectrow_array to get a single value.

my ($crows) = $dbh->selectrow_array($sqlc); print $crows;

Notice that $crows was declared in list context, to avoid side effects.