in reply to Re: I want to save web pages as text rather than as HTML. -- oneliner
in thread I want to save web pages as text rather than as HTML.
Thanks for all that info. It's a lot to digest.
Despite the elegance of a one-liner, I prefer to take one step at a time.
When I try to run the following code:
use strict; use warnings; use LWP::UserAgent; use LWP::Simple; use HTML::TreeBuilder; print HTML::TreeBuilder->new_from_url('http://perl.org')->as_text;
I get the error message << Can't locate object method "new_from_url" via package "HTML::TreeBuilder" >>
What else do I need to add to the code to make it work?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: I want to save web pages as text rather than as HTML. -- oneliner
by Your Mother (Archbishop) on Sep 10, 2019 at 21:25 UTC | |
by anautismobserver (Sexton) on Sep 11, 2019 at 01:05 UTC | |
by Your Mother (Archbishop) on Sep 11, 2019 at 06:59 UTC | |
by Anonymous Monk on Sep 11, 2019 at 17:25 UTC | |
by Anonymous Monk on Sep 19, 2019 at 19:44 UTC |