Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Take a look at HTML::Parser it already does what you want to do. You'll be better off if you don't reinvent this very complicated wheel.

If you really want to do a parser for academic reason I would recommend at least using Parse::RecDescent written by TheDamian this will get you though the tags correctly.

Else you might just be looking for a text based browser like lynx it will run on *nix and M$ Win

As for your post you can use <code> </code> tags to get you spacing and wrapping correct. I also lets other monks DL your code. There are several resources on Perlmonks that can help you out such as turnstep's home node.
Enjoy Perlmonks

UPDATE: as crazyinsomniac pointed out I would be remiss if I did not point out that some searches could have helped out finding some similar nodes like:
  • parsing HTML
  • Dump Text from HTML
    Search is your friend :)
    Some other nodes to read On asking for help and How to ReadTheFineManual

    grep> cd pub
    grep> more beer

    In reply to Re: how to force HTML to display as text by grep
    in thread how to force HTML to display as text by Summers_Azin_pr0n

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

    • Are you posting in the right place? Check out Where do I post X? to know for sure.
    • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
      <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
    • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
    • Want more info? How to link or or How to display code and escape characters are good places to start.
  • Log In?

    What's my password?
    Create A New User
    Domain Nodelet?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (6)
    As of 2022-01-17 11:16 GMT
    Find Nodes?
      Voting Booth?
      In 2022, my preferred method to securely store passwords is:

      Results (51 votes). Check out past polls.