in reply to HTML module help please?

HTML::Parser is the standard way to go.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

Replies are listed 'Best First'.
Re^2: HTML module help please?
by Cody Pendant (Prior) on Sep 01, 2004 at 02:21 UTC
    Thanks both of you. I appreciate those links. I now remember I've installed and used HTML::TokeParser in the past as well.

    I'm feeling particularly dumb today obviously, but I'm not seeing any "write whole file back out" in those modules, and I'm not sure about the logic.

    What I obvously need is something like

    get each tag if (tag is </h4>){ $just_found_h4_flag = 1; if tag is p && $just_found_h4_flag == 1 change p to blockquote; } else { $just_found_h4_flag = 0. }


    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
    =~y~b-v~a-z~s; print
      I've never actually used any HTML parsing module (or any parsing module, for that matter). However, if you SuperSearch, you might be able to find some more info.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      I shouldn't have to say this, but any code, unless otherwise stated, is untested