in reply to Re: Extract Web Page
in thread Extract Web Page

To get you started, look at the get function of LWP::Simple. Also, you might want to take a look at web spiders.

Useless trivia: In the 2004 Las Vegas phone book there are approximately 28 pages of ads for massage, but almost 200 for lawyers.

Replies are listed 'Best First'.
Re: Extract Web Page
by perleager (Pilgrim) on Apr 01, 2005 at 11:50 UTC
    Hello,

    A small example that uses LWP to retreive the contents of a file from the web. It stores the web page content your looking for into the file 'temp.html', where you then can use it to your liking.
    use LWP; my $filenamex = 'temp.html'; open FH, ">$filenamex"; print FH get("http://www.thewebsiteyouwant.com/page_you_want.html"); close FH;

    If you are looking to extract/parse information off that particular HTML page you want, might want to take a look at a module like HTML::TokeParser (I perfer using this, another popular one is HTML::TreeBuilder

    If you really want to learn a lot about LWP and the many uses it has, I recommend purchasing a used book of "Perl & LWP" published by O'Reilly.

    perleager