# Get the number of appointments my $numAp = $days[$dayCount]->numAppts; # Create a new Appt struct my $temp = Appt->new(); # Set the startTime element within my new Appt struct $temp->startTime("$str"); # Insert my new Appt struct into the appts array $days[$dayCount]->appts[$numAp] = $temp;