Get a web page : HTTP « Network « Perl






Get a web page

    

use LWP::Simple;

$content = get("http://www.cpan.org/doc/FAQs/index.html");

open FILEHANDLE, ">file.txt";

print FILEHANDLE $content;

close FILEHANDLE;

   
    
    
    
  








Related examples in the same category

1.Using HTTP::Request to post request and save response to a file
2.Retrieving a Web Page with get()
3.Using getstore() to Print an Invalid Page
4.Using is_success() with getstore()
5.Setting a User Agent and Retrieving a Web Page
6.Get a web page and save it to a local file