# Initialize a new object of the same type as $z for each element of @inits my @obj_array = map {ref($z)->new($_)} @inits;