develooper Front page | perl.libwww | Postings from December 2000

Parse and save to file

Thread Next
Ivan C Myrvold
December 17, 2000 10:55
Parse and save to file
Message ID:
I want to parse a web page, and have this command in my program:

$res = $ua->request(HTTP::Request->new(GET => $url), sub {$p->parse($_[0])});

But I also want this web page on file, so the next line is:

$res = $ua->request(HTTP::Request->new(GET => $url), 'tvschedule.html');

Can I combine these two into one, so I do not need to GET the web page two times?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About