How can I retreive the HTML for a URL and write it to a file?
Solution 1: LWP::Simple
The LWP::Simple module provides a simple interface to the LWP (lib-www-perl) modules. The example below will retreive a web page and write the HTML to a file:
Solution 2: LWP
The LWP object oriented style allows for more flexible behaviour:
Solution 3: Command Line
Once you have installed the LWP module, you can get pages on the command line as follows: