krishnapriya has asked for the wisdom of the Perl Monks concerning the following question:

Has html-parser will be part of perl standard build or do we need to install separately. Can any one guide me the link for installation.
  • Comment on Has html-parser will be part of perl standard build

Replies are listed 'Best First'.
Re: Has html-parser will be part of perl standard build
by marto (Cardinal) on Mar 28, 2011 at 14:00 UTC
Re: Has html-parser will be part of perl standard build
by Corion (Patriarch) on Mar 28, 2011 at 13:55 UTC
Re: Has html-parser will be part of perl standard build
by chrestomanci (Priest) on Mar 28, 2011 at 14:21 UTC

    It is always possible, to write your own perl code with regular expression to parse HTML, but unless your needs are very simple this is not recommended.

    If you are using Active Perl on windows then you can install HTML-Parser using the PPM client that should have been installed when you installed perl. Just type HTML-Parser into the search box, and click install, or type ppm install HTML-Parser into the command line version of PPM.

Re: Has html-parser will be part of perl standard build
by jaimon (Sexton) on Mar 28, 2011 at 16:27 UTC

    To add, you can check if the module is installed (in the default path) by using

    perl -MHTML::Parser -le 'print "yay..."'

    or

    perldoc HTML::Parser

    on *nix machines. Not sure about Windows.

    - J

      No need for the print. Just:

      perl -MHTML::Parser -e ;

      is fine. You'll get:

      Can't locate HTML/Parser.pm in @INC (@INC contains: ...

      if it's not there and silence otherwise.

      True laziness is hard work
      for windows, jaimon's perldoc example is fine at the command line; for his first, just swap the quotes around to satisfy Windows syntax (eg, perl -MHTML::Parser -le "print 'yay...'")