sub start_handler{ my $class = shift; #my ($class) = shift->{class}; my $attr = shift; my $self = shift; if($class eq 'title') { $self->handler(text => \&get_title, "text"); #$self->handler(end => sub{ },"dtext"); } elsif($class eq 'a') { $self->handler(text => \&get_a, "dtext"); } else { } #$self->handler(end => sub{push(@tests,[$class,$text]) if($tagname eq 'title')},"tagname"); } sub get_title() { print $title = shift; }