Almost, not quite. Need this:
# strips a specific tag from string sub eliminate_tags { my ($page, $tag) = @_; my $dom = Mojo::DOM->new; foreach my $b ($dom->parse($page)->find($tag)->each) { $b->remove } return $dom; }
So my beef it that: 1) I'd have to be familiar enough with Mojo::Dom to figure out it could do this (I'm not) so I needed to come PerlMonks to find someone like you to help and 2) I have to spend 20 min. wading through monstrous documentation to figure out how to use it for something simple.
So why isn't a specific tool better than a general purpose tool? You're saying a specific tool is inferior because it has more dependencies?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
In reply to Re^10: Looking for a module that strips an HTML tag and its associated 'TEXT'
by nysus
in thread Looking for a module that strips an HTML tag and its associated 'TEXT'
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |