in reply to Re: Proper use of HTML::Form for exctracting
in thread Proper use of HTML::Form for exctracting
Where is my mistake . Please advice me !
Method calls are not interpolated. If you move the method call outside the string it will actually be called. Here's an example as an SSCCE for which I've obviously replaced your private URL with a public one (I've also fixed the arguments to the gethtml method, your reversed closing tags, removed the indirect object notation and removed the unmatched <p1> element).
#!/usr/bin/perl use strict; use warnings; use HTML::Extract; my $extractor = HTML::Extract->new; print "Content-type: text/html\n\n"; print "<html><body>\n"; print $extractor->gethtml('http://perlsphere.net/', 'tagname=body', 'returntype=text'); print "</body></html>";
This could still be improved further but at least it shows you some working code. Enjoy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Proper use of HTML::Extract for extracting
by bachoA4o (Sexton) on Aug 27, 2018 at 13:00 UTC | |
by poj (Abbot) on Aug 27, 2018 at 14:56 UTC | |
by bachoA4o (Sexton) on Aug 27, 2018 at 15:57 UTC | |
by poj (Abbot) on Aug 27, 2018 at 17:04 UTC | |
by bachoA4o (Sexton) on Aug 27, 2018 at 18:44 UTC | |
by marto (Cardinal) on Aug 27, 2018 at 14:51 UTC |