in reply to Re: grabbing and printing text
in thread grabbing and printing text

Merlyn, thanks for the tip, but I have no idea how to use a HTML parser, I just started using Perl about a week ago. If you have any tips for how to do this without a parser, I would really appreciate it.

Replies are listed 'Best First'.
Re: Re: Re: grabbing and printing text
by merlyn (Sage) on May 09, 2001 at 19:37 UTC
    You are hand-writing a parser. You'll always be "using a parser". It will take you less time to learn to use HTML::HeadParser than it will to study the HTML specifications and learn to write regular expressions that match arbitrary meta-equiv strings correctly. Trust me on that.

    -- Randal L. Schwartz, Perl hacker

Re: Re: Re: grabbing and printing text
by ChemBoy (Priest) on May 09, 2001 at 20:12 UTC

    It's a pretty straight-forward module to use--start with the docs from perldoc.com, and if you can't figure it out from there, post what you're having trouble with (though you might first want to read this note, to make sure you're not overlooking something obvious).

    Note that you will have to install the whole HTML::Parser distribution to make any of this work. But it'll still be easier than writing a regex-based parser yourself.



    If God had meant us to fly, he would *never* have give us the railroads.
        --Michael Flanders