my $result = $db->query('SELECT * FROM shop_items'); while (my $row = $result->hash) { ... }