sub collect (&) { ($_[0]->() || return), &collect; } my @results = collect { $sth->fetchrow_hashref };