my @obj3s; while (CONDITION) { push @obj3s, Object3->new(); } my $obj2 = Object2->new(-children=>\@obj3s); # edited ... had the dreaded "=" without the ">"