use strict; use warnings; use encoding qw(UTF-8); use HTML::Strip qw(); use LWP::Simple qw(get); my $url = 'http://example.com'; my $hs = HTML::Strip->new(); my $clean_text = $hs->parse(get($url)); print $clean_text;