my @out; while ( my $doc = $collect->next ) { push(@out,$doc) }