##
use XML::Twig;
my $twig = XML::Twig->new(
twig_handlers => {
div => sub {
my $class = $_->att("class") // "";
$_->delete if $class eq "topsearchbar";
},
}
);
$twig->parse_html(\*DATA)->print;
__END__
Each of the unwanted divs at this point
starts
with
.
They are on lines 16-25 of the file.
####
Each of the unwanted divs at this point
starts
with
.
They are on lines 16-25 of the file.