
sleuth
Enthusiast
Dec 12, 2000, 2:28 PM
Post #1 of 1
(3171 views)
|
|
How do I fetch an HTML page on the web?
|
Can't Post
|
|
If you have the text based browser installed on your system called "lynx", you can use that like so, $url = "http://www.perlguru.com"; $html_code = `lynx -source $url`; Which runs a system command using those back ticks ``. The other way, which tends to be used more often, is by using the LWP set of modules, the simplest way is by using LWP::Simple; use LWP::Simple; $the_html = get("http://www.perlguru.com"); # do something with $the_html Sleuth
|