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.


In reply to Re^2: Proper use of HTML::Extract for extracting by hippo
in thread Proper use of HTML::Form for exctracting by bachoA4o

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.