http://qs321.pair.com?node_id=320251

Notromda has asked for the wisdom of the Perl Monks concerning the following question:

When using DBI, is it safe to do a comparison like:
if (! $sth->fetchrow_array()) { #no rows returned } else { # rows returned }
This feels like an error to me, though I can't prove why. Of course, I would prefer:
if ( $sth->rows() == 0 ) { #no rows returned }
I just would like to know if and why the first might be producing a bug in a program.