use greenObjects; use redObjects; my @objects=(); push(@objects, greenObjects->new()); push(@objects, redObjects->new());