sub somesub { # ... # ... # loop until $ecount is false # it is actually undocumented what this means # fetchrow_array is supposed to be called in list # context like so # # ($ecount) = $sth->fetchrow_array(); # while ( $ecount = $sth->fetchrow_array() ) { # .. } # $ecount is undef here, probably (see above) return $ecount; }