On Dec 23, 3:34 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: > Collaborate wrote: > > I am wondering if there is a way to copy a webpage to a text file > > using Perl. > > use LWP::Simple; > my $url = 'http://www.example.com/'; > open my $fh, '>', 'webpage.txt' or die $!; > print $fh get $url; > > -- > Gunnar Hjalmarsson > Email:http://www.gunnar.cc/cgi-bin/contact.pl
Thanks for your input. This is a really simple code to grab the html code and works great. Is there also a way to grab the text shown on the webpage rather than the html code? For example, the text on pages that are javascript (such as Yahoo Finance stock quotes) do not show on the html code. I would like to be able to copy the text even it is javascript. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/