struct Appt => { startTime => '$', endTime => '$', }; struct Day => { date => '$', appts => '@', numAppts => '$', }; #### my @days; my $dayCount = 0; #### sub hdl_start { my ($p, $elt, %atts) = @_; if ( $elt eq 'DAY' ) { # Create a new Day struct my $temp = Day->new(); # Set the date element of that struct $temp->date($atts{"DATE"}); # Insert that struct into my array, days $days[$dayCount] = $temp; } $currEle = $elt; } #### # 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;