Click to See Complete Forum and Search --> : Downloading web pages


jknox
09-15-2004, 06:08 PM
Wow, I used to use Perl all the time - now I can't remember a thing it seems. Basically I need to read a web page and parse some data from it, but I can't for the life of me remember how to do that. :(

Here's the basic idea in psuedo Perl:

open (IN, "Some web page");
while ($line = <IN>) {print $line;}

OK, not too exciting, but once I can do something like that I can run with it. I've been Googling about and can't even remember the right questions to ask. (For example I know I don't want an open statement, but I'm drawing a blank.) I would appreciate it if somebody help out here or point me in the direction of a web resource.

Thanks in advance.

Jona
09-21-2004, 11:10 PM
I'd suggest looking into the LWP (http://lwp.linpro.no/lwp/) module.

silent11
09-24-2004, 10:16 AM
use LWP::Simple;

my $html = get('http://website.com');