in reply to Re^9: Looking for a module that strips an HTML tag and its associated 'TEXT'
in thread Looking for a module that strips an HTML tag and its associated 'TEXT'
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Looking for a module that strips an HTML tag and its associated 'TEXT'
by marto (Cardinal) on Jul 29, 2020 at 15:31 UTC | |
by nysus (Parson) on Jul 29, 2020 at 15:42 UTC | |
by marto (Cardinal) on Jul 29, 2020 at 16:02 UTC | |
by nysus (Parson) on Jul 29, 2020 at 16:37 UTC | |
|
Re^11: Looking for a module that strips an HTML tag and its associated 'TEXT'
by marto (Cardinal) on Jul 29, 2020 at 16:19 UTC |