s...@z107.de:
hi,

On Fri, May 22, 2009 at 03:52:59AM -0400, Sarsamkar, Paryushan wrote:
I have a URL, which displays different content at different time. Now I
want to save the page as html page to a particular location. How can I
do that using perl?


use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => "http://example.com";);
my $res = $ua->request($req);
open(FILE, ">", "/tmp/index.html");
print FILE $res->content;
close(FILE);


that's not helpful enough if you are accessing a rich page like news.yahoo.com.

Jeff.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to