This has come up before. Not all modules are as well written nor as essential as as CGI.pm.

As for dealing with XML or HTML using regular expressions... I did that just the other day. I had a well-defined set of HTML to deal with and finding the right HTML-parsing module would have probably taken more time than rolling my own regexen did (and then I'd have to learn how to use that module and then apply that to the problem at hand).

If you are going to end up dealing with not-previously known XML/HTML, then I strongly recommend a module. Unfortunately, the module landscape in that area is still a bit rocky and undermapped. Several modules to choose from, most of which have some problems at least in some situations.

Also take a look at Why I like functional programming for another example of not using a module to parse HTML to excellent effect. It is one of many cases that remind me that we often deal with something that is nearly HTML or XML, which can make all the modules useless.

I'm not disagreeing with your recommendation to try to use modules. That is an excellent idea. I'm just advocating moderation. (:

        - tye (but my friends call me "Tye")

In reply to (tye)Re: Picking the best way.... by tye
in thread Picking the best way.... by tinman

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.