sub StartTag { # Other stuff okay... but add.. if ($tag eq 'story') { push @stories, {}; } } # This subroutine is mostly superflous now I think... sub EndTag { pop @curr; } sub Text { unless ($curr[-1] eq 'story') { $stories[-1]->{$curr[-1]} = $_; } }