in reply to Re^2: Toggling dbi attribute within a connection?
in thread Toggling dbi attribute within a connection?

if ($sth->fetchrow_arrayref) { $extraFetch = 5000000; } else { $extraFetch = $numRowsDisplayed; }
You might want to check for $sth->{Active} instead, it should be true if there is more to fetch and false otherwise.