http://www.perlmonks.org?node_id=11157918


in reply to Module to extract text from HTML

Mojo::DOM (via Mojo::UserAgent):

use strict; use warnings; use feature 'say'; use Mojo::UserAgent; my $ua = Mojo::UserAgent->new; say $ua->get('https://www.perlmonks.org')->res->dom->all_text;

WWW::Mechanize:

use strict; use warnings; use feature 'say'; use WWW::Mechanize; my $ua = WWW::Mechanize->new; $ua->get('https://perlmonks.org'); say $ua->content(format => 'text');