On Fri, 14 Sep 2001, Donald Leslie {74279} wrote:

> I tried the script and gott an error . I did a web search and found
> the following which fixed the problem .

...or again, you could use the far easier and far more effective
HTML::Parse module, like so:

    To parse the HTML, you can use the HTML module:

        #!/bin/perl

        use LWP::Simple;
        use HTML::Parse;

        print parse_html(get ($ARGV[0]))->format;

    You can save this version of the program under the name showurl,
    make it executable, and see what happens:

        % showurl http://www.ora.com/
        O'Reilly & Associates

        About O'Reilly -- Feedback -- Writing for O'Reilly

        What's New -- Here's a sampling of our most recent postings...

         * This Week in Web Review: Tracking Ads
           Are you running your Web site like a business? These tools can help.

         * Traveling with your dog? Enter the latest Travelers' Tales
           writing contest and send us a tale.


        New and Upcoming Releases
        ...
 
...pasted, again, from _Web Client Programming with Perl_, 
which is, again, available in it's entirety for free at:
<http://www.oreilly.com/openbook/webclient/>

There's really no good reason to attempt a regex for this problem.
Regexes are nice hammers, but not everything is a nice nail...


-- 
Chris Devers                     [EMAIL PROTECTED]


Reply via email to