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; }